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
missing iter(self) in _io._IOBase.readlines #74254
Comments
In _io._IOBase.readlines, it straightly uses PyIter_Next(self). But iter(_io._IOBase) does more work than just returning itself. >>> import _io
>>> f = _io._IOBase()
>>> f.close()
>>> f.readlines()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: I/O operation on closed file.
>>> f.readlines(10)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: '_io._IOBase' object has no attribute 'read' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: