diff options
author | R David Murray <rdmurray@bitdance.com> | 2013-05-06 16:58:41 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2013-05-06 16:58:41 (GMT) |
commit | 5c29bb331a6b36533f57561f7873ee0564341d72 (patch) | |
tree | 619dde1ab37c646def5d768a731a4d6ed8fa3f70 | |
parent | d62451770a2d0880055f7ecf271bd0ab567c8f75 (diff) | |
parent | 25cd09115d221a9befb3cb57e2226444448d60d1 (diff) | |
download | cpython-5c29bb331a6b36533f57561f7873ee0564341d72.zip cpython-5c29bb331a6b36533f57561f7873ee0564341d72.tar.gz cpython-5c29bb331a6b36533f57561f7873ee0564341d72.tar.bz2 |
Merge #14187: Add glossary entry for 'function annotations'.
Patch by Chris Rebert.
-rw-r--r-- | Doc/glossary.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/glossary.rst b/Doc/glossary.rst index f30138a..63f1021 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -252,6 +252,16 @@ Glossary the execution of the body. See also :term:`parameter`, :term:`method`, and the :ref:`function` section. + function annotation + An arbitrary metadata value associated with a function parameter or return + value. Its syntax is explained in section :ref:`function`. Annotations + may be accessed via the :attr:`__annotations__` special attribute of a + function object. + + Python itself does not assign any particular meaning to function + annotations. They are intended to be interpreted by third-party libraries + or tools. See :pep:`3107`, which describes some of their potential uses. + __future__ A pseudo-module which programmers can use to enable new language features which are not compatible with the current interpreter. |