[3.14] gh-138307: Update the Ellipsis documentation (GH-138306) (#138440)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
This commit is contained in:
Miss Islington (bot) 2025-09-11 11:22:37 +02:00 committed by GitHub
parent 4ce4b82d35
commit dd930baf45
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 45 additions and 7 deletions

View file

@ -251,6 +251,7 @@ statements: a ``try`` statement's ``else`` clause runs when no exception
occurs, and a loop's ``else`` clause runs when no ``break`` occurs. For more on
the ``try`` statement and exceptions, see :ref:`tut-handling`.
.. index:: single: ...; ellipsis literal
.. _tut-pass:
:keyword:`!pass` Statements
@ -277,6 +278,12 @@ at a more abstract level. The :keyword:`!pass` is silently ignored::
... pass # Remember to implement this!
...
For this last case, many people use the ellipsis literal :code:`...` instead of
:code:`pass`. This use has no special meaning to Python, and is not part of
the language definition (you could use any constant expression here), but
:code:`...` is used conventionally as a placeholder body as well.
See :ref:`bltin-ellipsis-object`.
.. _tut-match: