summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2015-05-22 17:14:11 (GMT)
committerGuido van Rossum <guido@python.org>2015-05-22 17:14:11 (GMT)
commit46dbb7d1032c19163f37785509b8f5b3004416e8 (patch)
tree85f29b8330b82cefcf01b50a12a2cd9f28ccf801 /Doc
parent569db2c9f6d1adc787c6f44a9b2f4e4d9bbde272 (diff)
downloadcpython-46dbb7d1032c19163f37785509b8f5b3004416e8.zip
cpython-46dbb7d1032c19163f37785509b8f5b3004416e8.tar.gz
cpython-46dbb7d1032c19163f37785509b8f5b3004416e8.tar.bz2
Preliminary typing.py, anticipating provisional acceptance of PEP 484.
There area bunch of TODOs here, but the biggest (not mentioned in the file) is that I'm going to take out __instancecheck__ and __subclasscheck__. However my personal schedule is such that I probably won't have time for these before Larry tags beta 1. But I will try -- this commit is mostly to make sure that typing.py doesn't completely miss the train. PS. I'm tracking issues at https://github.com/ambv/typehinting/issues.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/typing.rst15
1 files changed, 15 insertions, 0 deletions
diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst
new file mode 100644
index 0000000..c94bea1
--- /dev/null
+++ b/Doc/library/typing.rst
@@ -0,0 +1,15 @@
+:mod:`typing` --- Support for type hints
+========================================
+
+.. module:: typing
+ :synopsis: Support for type hints (see PEP 484).
+
+**Source code:** :source:`Lib/typing.py`
+
+--------------
+
+This module supports type hints as specified by :pep:`484`. The most
+fundamental support consists of the type :class:`Any`, :class:`Union`,
+:class:`Tuple`, :class:`Callable`, :class:`TypeVar`, and
+:class:`Generic`. For full specification please see :pep:`484`. For
+a simplified introduction to type hints see :pep:`483`.