Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions Include/internal/pycore_global_objects_fini_generated.h

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

1 change: 1 addition & 0 deletions Include/internal/pycore_global_strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ struct _Py_global_strings {
STRUCT_FOR_ID(header)
STRUCT_FOR_ID(headers)
STRUCT_FOR_ID(hi)
STRUCT_FOR_ID(hint)
STRUCT_FOR_ID(hook)
STRUCT_FOR_ID(hour)
STRUCT_FOR_ID(hours)
Expand Down
1 change: 1 addition & 0 deletions Include/internal/pycore_runtime_init_generated.h

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

4 changes: 4 additions & 0 deletions Include/internal/pycore_unicodeobject_generated.h

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Allow passing ``hint`` and ``size`` as keyword arguments to
:meth:`io.IOBase.readlines` and :meth:`io.IOBase.readline` respectively.
93 changes: 78 additions & 15 deletions Modules/_io/clinic/iobase.c.h

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

7 changes: 3 additions & 4 deletions Modules/_io/iobase.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,6 @@ _io__IOBase_isatty_impl(PyObject *self)
/*[clinic input]
_io._IOBase.readline
size as limit: Py_ssize_t(accept={int, NoneType}) = -1
/

Read and return a line from the stream.

Expand All @@ -566,7 +565,7 @@ terminator(s) recognized.

static PyObject *
_io__IOBase_readline_impl(PyObject *self, Py_ssize_t limit)
/*[clinic end generated code: output=4479f79b58187840 input=d0c596794e877bff]*/
/*[clinic end generated code: output=4479f79b58187840 input=5ed037c83054bf41]*/
{
/* For backwards compatibility, a (slowish) readline(). */

Expand Down Expand Up @@ -703,7 +702,7 @@ iobase_iternext(PyObject *self)
/*[clinic input]
_io._IOBase.readlines
hint: Py_ssize_t(accept={int, NoneType}) = -1
/


Return a list of lines from the stream.

Expand All @@ -714,7 +713,7 @@ lines so far exceeds hint.

static PyObject *
_io__IOBase_readlines_impl(PyObject *self, Py_ssize_t hint)
/*[clinic end generated code: output=2f50421677fa3dea input=9400c786ea9dc416]*/
/*[clinic end generated code: output=2f50421677fa3dea input=ca109061c220173b]*/
{
Py_ssize_t length = 0;
PyObject *result, *it = NULL;
Expand Down
Loading