Do you have real-world use cases for map's None fill-in feature?

Fredrik Lundh fredrik at pythonware.com
Tue Jan 10 11:42:37 EST 2006


Szabolcs Nagy wrote:

> there are iterators which has length:
> >>> i = iter([1,2,3])
> >>> len(i)
> 3

that's a bug, which has been fixed in 2.5:

Python 2.5a0 (#5, Dec 14 2005, 22:28:52)
Type "help", "copyright", "credits" or "license" for more information.
>>> i = iter([1, 2, 3])
>>> len(i)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: len() of unsized object

</F>






More information about the Python-list mailing list