diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2017-11-26 22:27:44 (GMT) |
---|---|---|
committer | Mariatta <Mariatta@users.noreply.github.com> | 2017-11-26 22:27:44 (GMT) |
commit | cceb0f8d7b3451fb8de03651c979f5ac639b68c0 (patch) | |
tree | 76064d21d36f6de1d1afb96541648e91be384eb0 /Doc | |
parent | 04af8ace86d4396bc64fc401f36049ab745fd8c1 (diff) | |
download | cpython-cceb0f8d7b3451fb8de03651c979f5ac639b68c0.zip cpython-cceb0f8d7b3451fb8de03651c979f5ac639b68c0.tar.gz cpython-cceb0f8d7b3451fb8de03651c979f5ac639b68c0.tar.bz2 |
bpo-29879: Update typing documentation. (GH-4573) (GH-4574)
- Add "version added: 3.5.2" note where it was missing.
- Remove the mention that Reversible is new in 3.5.2
(cherry picked from commit 0cd2e81bea639828d7c9a7afc61fb1da9699492c)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/typing.rst | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index 9883d8b..d28a5d5 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -146,6 +146,8 @@ See :pep:`484` for more details. ``Derived`` is expected. This is useful when you want to prevent logic errors with minimal runtime cost. +.. versionadded:: 3.5.2 + Callable -------- @@ -494,6 +496,8 @@ The module defines the following classes, functions and decorators: ``Type[Any]`` is equivalent to ``Type`` which in turn is equivalent to ``type``, which is the root of Python's metaclass hierarchy. + .. versionadded:: 3.5.2 + .. class:: Iterable(Generic[T_co]) A generic version of :class:`collections.abc.Iterable`. @@ -674,6 +678,8 @@ The module defines the following classes, functions and decorators: A generic version of :class:`collections.defaultdict`. + .. versionadded:: 3.5.2 + .. class:: Counter(collections.Counter, Dict[T, int]) A generic version of :class:`collections.Counter`. @@ -762,6 +768,8 @@ The module defines the following classes, functions and decorators: def add_unicode_checkmark(text: Text) -> Text: return text + u' \u2713' + .. versionadded:: 3.5.2 + .. class:: io Wrapper namespace for I/O stream types. @@ -847,6 +855,8 @@ The module defines the following classes, functions and decorators: UserId = NewType('UserId', int) first_user = UserId(1) + .. versionadded:: 3.5.2 + .. function:: cast(typ, val) Cast a value to a type. @@ -1054,3 +1064,5 @@ The module defines the following classes, functions and decorators: "forward reference", to hide the ``expensive_mod`` reference from the interpreter runtime. Type annotations for local variables are not evaluated, so the second annotation does not need to be enclosed in quotes. + + .. versionadded:: 3.5.2 |