diff options
author | Yury Selivanov <yury@magic.io> | 2016-09-09 03:50:03 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2016-09-09 03:50:03 (GMT) |
commit | f8cb8a16a344ab208fd46876c4b63604987347b8 (patch) | |
tree | c44caa48291401d1e1e388004d2762513ac88c93 /Doc/glossary.rst | |
parent | 09ad17810c38d1aaae02de69084dd2a8ad9f5cdb (diff) | |
download | cpython-f8cb8a16a344ab208fd46876c4b63604987347b8.zip cpython-f8cb8a16a344ab208fd46876c4b63604987347b8.tar.gz cpython-f8cb8a16a344ab208fd46876c4b63604987347b8.tar.bz2 |
Issue #27985: Implement PEP 526 -- Syntax for Variable Annotations.
Patch by Ivan Levkivskyi.
Diffstat (limited to 'Doc/glossary.rst')
-rw-r--r-- | Doc/glossary.rst | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/glossary.rst b/Doc/glossary.rst index 3d05c14..f80b6df 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -964,6 +964,18 @@ Glossary ``'\r'``. See :pep:`278` and :pep:`3116`, as well as :func:`bytes.splitlines` for an additional use. + variable annotation + A type metadata value associated with a module global variable or + a class attribute. Its syntax is explained in section :ref:`annassign`. + Annotations are stored in the :attr:`__annotations__` special + 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. + virtual environment A cooperatively isolated runtime environment that allows Python users and applications to install and upgrade Python distribution packages |