mirror of
https://github.com/python/cpython.git
synced 2025-11-24 12:20:42 +00:00
[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:
parent
4ce4b82d35
commit
dd930baf45
5 changed files with 45 additions and 7 deletions
|
|
@ -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:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue