bpo-35089: Don't mention typing.io and typing.re (GH-10173)

https://bugs.python.org/issue35089
(cherry picked from commit c8a8d6b347)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
This commit is contained in:
Miss Islington (bot) 2018-10-28 09:16:36 -07:00 committed by GitHub
parent 50e04cc273
commit c516dc6e57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 16 deletions

View File

@ -779,32 +779,25 @@ The module defines the following classes, functions and decorators:
.. versionadded:: 3.5.2
.. class:: io
.. class:: IO
TextIO
BinaryIO
Wrapper namespace for I/O stream types.
This defines the generic type ``IO[AnyStr]`` and subclasses ``TextIO``
and ``BinaryIO``, deriving from ``IO[str]`` and ``IO[bytes]``,
respectively. These represent the types of I/O streams such as returned by
Generic type ``IO[AnyStr]`` and its subclasses ``TextIO(IO[str])``
and ``BinaryIO(IO[bytes])``
represent the types of I/O streams such as returned by
:func:`open`.
These types are also accessible directly as ``typing.IO``,
``typing.TextIO``, and ``typing.BinaryIO``.
.. class:: Pattern
Match
.. class:: re
Wrapper namespace for regular expression matching types.
This defines the type aliases ``Pattern`` and ``Match`` which
These type aliases
correspond to the return types from :func:`re.compile` and
:func:`re.match`. These types (and the corresponding functions)
are generic in ``AnyStr`` and can be made specific by writing
``Pattern[str]``, ``Pattern[bytes]``, ``Match[str]``, or
``Match[bytes]``.
These types are also accessible directly as ``typing.Pattern``
and ``typing.Match``.
.. class:: NamedTuple
Typed version of namedtuple.

View File

@ -0,0 +1,2 @@
Remove mention of ``typing.io`` and ``typing.re``. Their types should be
imported from ``typing`` directly.