Skip to content
2 changes: 1 addition & 1 deletion Lib/_pyio.py
Original file line number Diff line number Diff line change
Expand Up @@ -1928,7 +1928,7 @@ def truncate(self, pos=None):
"""Truncate size to pos, where pos is an int."""
self._unsupported("truncate")

def readline(self):
def readline(self, size=-1, /):
"""Read until newline or EOF.
Returns an empty string if EOF is hit immediately.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add missing ``size`` positional argument to the pure-Python implementation of :meth:`io.TextIOBase.readline`.
Loading