diff options
author | Jelle Zijlstra <jelle.zijlstra@gmail.com> | 2021-05-04 09:29:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-04 09:29:49 (GMT) |
commit | b11557973476963f7c0fd0041eac175bc0d4c514 (patch) | |
tree | 5c69904eb3fe97e12f57ee7d0c8b90a9af0786a2 | |
parent | f6d7abc6e72294c5573709cca78ae252e03ebe3d (diff) | |
download | cpython-b11557973476963f7c0fd0041eac175bc0d4c514.zip cpython-b11557973476963f7c0fd0041eac175bc0d4c514.tar.gz cpython-b11557973476963f7c0fd0041eac175bc0d4c514.tar.bz2 |
bpo-38352: Add to typing.__all__ (#25821)
This adds IO, TextIO, BinaryIO, Match, and Pattern.
Co-authored-by: Ćukasz Langa <lukasz@langa.pl>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
-rw-r--r-- | Lib/typing.py | 7 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Library/2021-05-02-13-54-25.bpo-38352.N9MlhV.rst | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/Lib/typing.py b/Lib/typing.py index ff96434..301a477 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -99,6 +99,13 @@ __all__ = [ 'NamedTuple', # Not really a type. 'TypedDict', # Not really a type. 'Generator', + + # Other concrete types. + 'BinaryIO', + 'IO', + 'Match', + 'Pattern', + 'TextIO', # One-off things. 'AnyStr', diff --git a/Misc/NEWS.d/next/Library/2021-05-02-13-54-25.bpo-38352.N9MlhV.rst b/Misc/NEWS.d/next/Library/2021-05-02-13-54-25.bpo-38352.N9MlhV.rst new file mode 100644 index 0000000..bf8fe75 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-05-02-13-54-25.bpo-38352.N9MlhV.rst @@ -0,0 +1,2 @@ +Add ``IO``, ``BinaryIO``, ``TextIO``, ``Match``, and ``Pattern`` to +``typing.__all__``. Patch by Jelle Zijlstra. |