mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
gh-138307: Update the Ellipsis documentation (#138306)
* Doc: Change Ellipsis doc at library/constants * Doc: Change Ellipsis doc at library/stdtypes * Doc: Add NumPy reference into Ellipsis doc at library/stdtypes * Doc: Add Ellipsis reference into the pass statement section at tutorial * Doc: Update Ellipsis doc concerns assignments at library/constants * Update Doc/library/stdtypes.rst Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> * Doc: Fix grammar on Ellipsis docs (library/constants.rst) Co-authored-by: Éric <merwok@netwok.org> * Doc: Fix grammar on Ellipsis docs (library/stdtypes.rst) Co-authored-by: Éric <merwok@netwok.org> * Doc: Fix grammar on Ellipsis docs (library/stdtypes.rst) Co-authored-by: Éric <merwok@netwok.org> * Doc: Remove pretty printers reference from Ellipsis doc at library/stdtypes * Doc: Update index concerns Ellipsis object and pass statement * Doc: Improve Ellipsis doc at library/constants * Doc: Improve Ellipsis doc at library/stdtypes * Doc: Change the "..." glossary entry to mention the Ellipsis object * Doc: Some improvements concern ellipsis into typing doc * Minor update Doc/tutorial/controlflow.rst Co-authored-by: Ned Batchelder <ned@nedbatchelder.com> * Update Doc/library/constants.rst Co-authored-by: Ned Batchelder <ned@nedbatchelder.com> * Update Doc/library/stdtypes.rst Co-authored-by: Ned Batchelder <ned@nedbatchelder.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
8c1ae6de11
commit
88665de120
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