summaryrefslogtreecommitdiffstats
path: root/Doc/glossary.rst
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2018-01-26 16:20:18 (GMT)
committerƁukasz Langa <lukasz@langa.pl>2018-01-26 16:20:18 (GMT)
commit95e4d589137260530e18ef98a2ed84ee3ec57e12 (patch)
tree9d0c3bc48158e9f0c83f1b9cb509c1fbebd9cfde /Doc/glossary.rst
parentd7773d92bd11640a8c950d6c36a9cef1cee36f96 (diff)
downloadcpython-95e4d589137260530e18ef98a2ed84ee3ec57e12.zip
cpython-95e4d589137260530e18ef98a2ed84ee3ec57e12.tar.gz
cpython-95e4d589137260530e18ef98a2ed84ee3ec57e12.tar.bz2
String annotations [PEP 563] (#4390)
* Document `from __future__ import annotations` * Provide plumbing and tests for `from __future__ import annotations` * Implement unparsing the AST back to string form This is required for PEP 563 and as such only implements a part of the unparsing process that covers expressions.
Diffstat (limited to 'Doc/glossary.rst')
-rw-r--r--Doc/glossary.rst17
1 files changed, 10 insertions, 7 deletions
diff --git a/Doc/glossary.rst b/Doc/glossary.rst
index f0fcb62..dcfe086 100644
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -372,9 +372,11 @@ Glossary
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.
+ See also the :term:`variable annotation` glossary entry.
+
+ Annotations are meant to provide a standard way for programmers to
+ document types of functions they design. See :pep:`484`, which
+ describes this functionality.
__future__
A pseudo-module which programmers can use to enable new language features
@@ -1021,10 +1023,11 @@ Glossary
attribute of a class or module object and can be accessed using
:func:`typing.get_type_hints`.
- Python itself does not assign any particular meaning to variable
- annotations. They are intended to be interpreted by third-party libraries
- or type checking tools. See :pep:`526`, :pep:`484` which describe
- some of their potential uses.
+ See also the :term:`function annotation` glossary entry.
+
+ Annotations are meant to provide a standard way for programmers to
+ document types of functions they design. See :pep:`484` and :pep:`526`
+ which describe this functionality.
virtual environment
A cooperatively isolated runtime environment that allows Python users