Attempt to clarify the ByteString situation (#9783)

See https://github.com/python/cpython/issues/102092

This makes the behaviour of typing.ByteString better match its
documentation.
This commit is contained in:
Shantanu
2023-05-27 21:37:38 -07:00
committed by GitHub
parent 82ea677495
commit d6a85e2c48
6 changed files with 11 additions and 4 deletions

View File

@@ -771,7 +771,7 @@ class TextIO(IO[str]):
@abstractmethod
def __enter__(self) -> TextIO: ...
class ByteString(Sequence[int], metaclass=ABCMeta): ...
ByteString: typing_extensions.TypeAlias = bytes | bytearray | memoryview
# Functions