Bug report
Checklist
CPython versions tested on:
3.11, CPython main branch
Operating systems tested on:
Linux, macOS, Windows
Output from running 'python -VV' on the command line:
Python 3.11.4 (main, Jun 20 2023, 17:23:00) [Clang 14.0.3 (clang-1403.0.22.14.1)]
A clear and concise description of the bug:
The method parameters in python are part of the public interface, due to kwargs.
From typing.IO: undocumented / source
def read(self, n: int = -1) -> AnyStr:
pass
From io.RawIOBase: docs / source
def read(self, size=-1):
...
If I implement both IO[bytes] and RawIOBase, should name the variable n or size?
Additionally, RawIOBase.read checks for null, so should the type hint be Optional[int]?
Linked PRs
Bug report
Checklist
and am confident this bug has not been reported before
CPython versions tested on:
3.11, CPython main branch
Operating systems tested on:
Linux, macOS, Windows
Output from running 'python -VV' on the command line:
Python 3.11.4 (main, Jun 20 2023, 17:23:00) [Clang 14.0.3 (clang-1403.0.22.14.1)]
A clear and concise description of the bug:
The method parameters in python are part of the public interface, due to kwargs.
From
typing.IO: undocumented / sourceFrom
io.RawIOBase: docs / sourceIf I implement both
IO[bytes]andRawIOBase, should name the variablenorsize?Additionally,
RawIOBase.readchecks for null, so should the type hint beOptional[int]?Linked PRs