[Python-checkins] cpython (3.3): #14187: Add glossary entry for 'function annotations'.
r.david.murray
python-checkins at python.org
Mon May 6 18:59:27 CEST 2013
http://hg.python.org/cpython/rev/e2a805281d26
changeset: 83646:e2a805281d26
branch: 3.3
parent: 83640:bb4bb2db6106
user: R David Murray <rdmurray at bitdance.com>
date: Mon May 06 12:58:16 2013 -0400
summary:
#14187: Add glossary entry for 'function annotations'.
Patch by Chris Rebert.
files:
Doc/glossary.rst | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/Doc/glossary.rst b/Doc/glossary.rst
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -252,6 +252,16 @@
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.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list