list() coercion

Ian Bicking ianb at
Fri Jul 18 05:18:30 CEST 2003

On Thu, 2003-07-17 at 10:08, Raymond Hettinger wrote:
> Instead of:
>     list(yourobj)
> use:
>     list(iter(yourobj))

Sigh... that's too bad.  I'll probably just get rid of the __len__
method instead, as list(yourobj) (list(myobj)?) is a more appealing
idiom than len(somebodysobj).


More information about the Python-list mailing list