Kaydet (Commit) c8a8d6b3 authored tarafından Sebastian Rittau's avatar Sebastian Rittau Kaydeden (comit) Ivan Levkivskyi

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

https://bugs.python.org/issue35089
üst 163eca34
...@@ -779,32 +779,25 @@ The module defines the following classes, functions and decorators: ...@@ -779,32 +779,25 @@ The module defines the following classes, functions and decorators:
.. versionadded:: 3.5.2 .. versionadded:: 3.5.2
.. class:: io .. class:: IO
TextIO
BinaryIO
Wrapper namespace for I/O stream types. Generic type ``IO[AnyStr]`` and its subclasses ``TextIO(IO[str])``
and ``BinaryIO(IO[bytes])``
This defines the generic type ``IO[AnyStr]`` and subclasses ``TextIO`` represent the types of I/O streams such as returned by
and ``BinaryIO``, deriving from ``IO[str]`` and ``IO[bytes]``,
respectively. These represent the types of I/O streams such as returned by
:func:`open`. :func:`open`.
These types are also accessible directly as ``typing.IO``, .. class:: Pattern
``typing.TextIO``, and ``typing.BinaryIO``. Match
.. class:: re
Wrapper namespace for regular expression matching types. These type aliases
This defines the type aliases ``Pattern`` and ``Match`` which
correspond to the return types from :func:`re.compile` and correspond to the return types from :func:`re.compile` and
:func:`re.match`. These types (and the corresponding functions) :func:`re.match`. These types (and the corresponding functions)
are generic in ``AnyStr`` and can be made specific by writing are generic in ``AnyStr`` and can be made specific by writing
``Pattern[str]``, ``Pattern[bytes]``, ``Match[str]``, or ``Pattern[str]``, ``Pattern[bytes]``, ``Match[str]``, or
``Match[bytes]``. ``Match[bytes]``.
These types are also accessible directly as ``typing.Pattern``
and ``typing.Match``.
.. class:: NamedTuple .. class:: NamedTuple
Typed version of namedtuple. Typed version of namedtuple.
......
Remove mention of ``typing.io`` and ``typing.re``. Their types should be
imported from ``typing`` directly.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment