Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 25cd091

Browse files
committed
#14187: Add glossary entry for 'function annotations'.
Patch by Chris Rebert.
1 parent def51ca commit 25cd091

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Doc/glossary.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,16 @@ Glossary
252252
the execution of the body. See also :term:`parameter`, :term:`method`,
253253
and the :ref:`function` section.
254254

255+
function annotation
256+
An arbitrary metadata value associated with a function parameter or return
257+
value. Its syntax is explained in section :ref:`function`. Annotations
258+
may be accessed via the :attr:`__annotations__` special attribute of a
259+
function object.
260+
261+
Python itself does not assign any particular meaning to function
262+
annotations. They are intended to be interpreted by third-party libraries
263+
or tools. See :pep:`3107`, which describes some of their potential uses.
264+
255265
__future__
256266
A pseudo-module which programmers can use to enable new language features
257267
which are not compatible with the current interpreter.

0 commit comments

Comments
 (0)