]> granicus.if.org Git - python/commit
Fix buglet reported on c.l.py: map(fnc, file.xreadlines()) blows up.
authorTim Peters <tim.peters@gmail.com>
Sat, 28 Apr 2001 08:20:22 +0000 (08:20 +0000)
committerTim Peters <tim.peters@gmail.com>
Sat, 28 Apr 2001 08:20:22 +0000 (08:20 +0000)
commit748b8bbe020561cdb953b052f7f9d43be83d8081
tree782b257eef3368631c4bcddeee83a682308952cc
parentb3d8d1f76c64998e7e7789955718c1c24b2f84c6
Fix buglet reported on c.l.py:  map(fnc, file.xreadlines()) blows up.
Also a 2.1 bugfix candidate (am I supposed to do something with those?).
Took away map()'s insistence that sequences support __len__, and cleaned
up the convoluted code that made it *look* like it really cared about
__len__ (in fact the old ->len field was only *used* as a flag bit, as
the main loop only looked at its sign bit, setting the field to -1 when
IndexError got raised; renamed the field to ->saw_IndexError instead).
Python/bltinmodule.c