Do you have real-world use cases for map's None fill-in feature?
Tue Jan 10 17:38:17 CET 2006
"Szabolcs Nagy" <nszabolcs at gmail.com> writes:
> there are iterators which has length:
> >>> i = iter([1,2,3])
> >>> len(i)
> now isn't there a way to make this length inheritible?
I expect that's a __len__ method, which can be inherited.
> eg. generators could have length in this case:
> >>> g = (x for x in [1,2,3])
> >>> # len(g) == len([1,2,3]) == 3
I dunno what happens with this now.
More information about the Python-list