Congruence of 'map' and 'for' broken in 2.1??

Neil Schemenauer nas at python.ca
Fri Apr 27 17:47:01 EDT 2001


nanotech at europa.com wrote:
> OK, now that my subject line hooked you :) I am trying to determine
> why I can not use fh.xreadlines() in map:

Use .readlines() instead.  .xreadlines() is a lazy sequence.
map() could work on the object that xreadlines() returns but I
guess its not smart enough.  Patches submitted to SourceForge
will be gladly accepted. :-)

BTW, this is not something that broke in 2.1 since earlier
versions of Python did not have xreadlines().  

  Neil




More information about the Python-list mailing list