Message291641
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' |
|
Date |
User |
Action |
Args |
2017-04-14 06:45:24 | xiang.zhang | set | recipients:
+ xiang.zhang |
2017-04-14 06:45:23 | xiang.zhang | set | messageid: <1492152323.97.0.555088221985.issue30068@psf.upfronthosting.co.za> |
2017-04-14 06:45:23 | xiang.zhang | link | issue30068 messages |
2017-04-14 06:45:22 | xiang.zhang | create | |
|