Chris Rebert <pyb...@rebertia.com> added the comment:

Strawman entry wording:

An annotation is an arbitrary metadata value associated with a function 
parameter or return value. The syntax for function annotations is explained in 
[Function 
definitions][http://docs.python.org/dev/reference/compound_stmts.html#function-definitions].
 Annotations may be accessed via the 
[__annotations__][http://docs.python.org/dev/reference/datamodel.html#the-standard-type-hierarchy
 : Callable types -> User-defined functions -> Special attributes] 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. 
Annotations were added to Python by [PEP 3107 "Function 
Annotations"][http://www.python.org/dev/peps/pep-3107/], which describes some 
of their possible uses.

Some other languages (e.g. Java, C#) also have a concept of "annotations", but 
it is distinct from the Python concept; the purpose of these "annotations" is 
served in Python using [decorators]["decorator" entry in Glossary] instead.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14187>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to