Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
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
Next Next commit
Use consistent mood, since we're touching this anyways
  • Loading branch information
erlend-aasland committed May 10, 2023
commit 28fc57ea0999822a8d251c8acafdef1fb42abffa
6 changes: 3 additions & 3 deletions Modules/_io/bufferedio.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ _io._BufferedIOBase.read

Read and return up to n bytes.

If the argument is omitted, None, or negative, reads and
returns all data until EOF
If the argument is omitted, None, or negative, read and
return all data until EOF
Comment thread
erlend-aasland marked this conversation as resolved.
Outdated

If the argument is positive, and the underlying raw stream is
not 'interactive', multiple raw reads may be issued to satisfy
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It would be nice to clarify what "interactive" means. I suppose that it's related to "is it a TTY?" test.

The doc uses the same phrasing: https://docs.python.org/dev/library/io.html#io.BufferedIOBase.read

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah. Let's improve that in a separate issue/PR. Good observation, though!

Expand All @@ -160,7 +160,7 @@ mode and no data is available at the moment.
static PyObject *
_io__BufferedIOBase_read_impl(PyObject *self, PyTypeObject *cls,
PyObject *args)
/*[clinic end generated code: output=4521b30940fd7b67 input=7e26b448274234a0]*/
/*[clinic end generated code: output=4521b30940fd7b67 input=83f4490585256485]*/
{
_PyIO_State *state = IO_STATE();
return bufferediobase_unsupported(state, "read");
Expand Down
6 changes: 3 additions & 3 deletions Modules/_io/clinic/bufferedio.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.