8000 bpo-35089: Don't mention typing.io and typing.re by srittau · Pull Request #10173 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-35089: Don't mention typing.io and typing.re #10173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 28, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add 'its'
  • Loading branch information
srittau committed Oct 28, 2018
commit 2fddd79f8bdb2fed8d344d9b89706db6212cb10b
2 changes: 1 addition & 1 deletion Doc/library/typing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ The module defines the following classes, functions and decorators:
TextIO
BinaryIO

Generic type ``IO[AnyStr]`` and subclasses ``TextIO(IO[str])``
Generic type ``IO[AnyStr]`` and its subclasses ``TextIO(IO[str])``
and ``BinaryIO(IO[bytes])``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually like the original formulation more. But this one is also fine.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "and its subclasses".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that "This defined" is now wrong, but when removing the verb you have to reformulate. I first ended up with:

The generic type IO[AnyStr] and subclasses TextIO and BinaryIO, deriving from IO[str] and IO[bytes], respectively, represent the types of I/O streams such as returned by open.

But I found this hard to understand.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srittau You can also try splitting the sentence in two parts. Anyway, this is not very important.

represent the types of I/O streams such as returned by
:func:`open`.
Expand Down
0