[issue11163] iter() documentation code doesn't work
New submission from Michael Grazebrook
Changes by Antoine Pitrou
Bryce Verdier
Terry J. Reedy
Changes by Terry J. Reedy
Changes by Raymond Hettinger
Raymond Hettinger
Changes by Raymond Hettinger
Michael Grazebrook
Changes by Raymond Hettinger
: ---------- resolution: -> fixed status: open -> closed
_______________________________________ Python tracker
http://bugs.python.org/issue11163 _______________________________________ ----- No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1388 / Virus Database: 1513/3725 - Release Date: 06/25/11
----------
_______________________________________
Python tracker
purplezephyr added the comment:
This does not seem to have been changed in any version, per msg135246. If it's not going to be replaced, there's another issue, which is that the link to readline() in the text is incorrect - it goes to the readline module, not file.readline().
----------
nosy: +purplezephyr
_______________________________________
Python tracker
Terry J. Reedy added the comment:
In the current 3.3.2 docs, 'STOP' has been replaced by '', so there is a change, and no infinite loop. However, this is still does not strike me as an example of 'useful' as
for line in iter(fp.readline, "STOP"): # is a bad version of
for line in fp:
It does illustrate the behavior though.
----------
stage: -> needs patch
versions: +Python 3.4 -Python 3.1, Python 3.2
_______________________________________
Python tracker
participants (6)
-
Antoine Pitrou
-
Bryce Verdier
-
Michael Grazebrook
-
purplezephyr
-
Raymond Hettinger
-
Terry J. Reedy