summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_time.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-05-22 16:48:37 (GMT)
committerGuido van Rossum <guido@python.org>2001-05-22 16:48:37 (GMT)
commit5b021848ac728b9815d6c5c5b9622d3956665bbb (patch)
treec12c5ead6cde6a50e06a1eacf2d5148c78e301db /Lib/test/test_time.py
parentd992c2c74df75509b7120820307e9f26bf90ac06 (diff)
downloadcpython-5b021848ac728b9815d6c5c5b9622d3956665bbb.zip
cpython-5b021848ac728b9815d6c5c5b9622d3956665bbb.tar.gz
cpython-5b021848ac728b9815d6c5c5b9622d3956665bbb.tar.bz2
file_getiter(): make iter(file) be equivalent to file.xreadlines().
This should be faster. This means: (1) "for line in file:" won't work if the xreadlines module can't be imported. (2) The body of "for line in file:" shouldn't use the file directly; the effects (e.g. of file.readline(), file.seek() or even file.tell()) would be undefined because of the buffering that goes on in the xreadlines module.
Diffstat (limited to 'Lib/test/test_time.py')
0 files changed, 0 insertions, 0 deletions