Perl is worse! (was: Python is Wierd!)
Moshe Zadka
moshez at math.huji.ac.il
Fri Jul 28 03:11:05 EDT 2000
On Fri, 28 Jul 2000, Grant Edwards wrote:
> In article <io12ososq8or6t6lgdsclgp5eob5rs8cd7 at 4ax.com>, Ben Wolfson wrote:
>
> >list() (and tuple()) only work on objects that actually have a sequence
> >mapping makes a lot of sense and, to me, resolves the ambiguity in
> >precisely the way I would expect.
>
> Is 'sequence mapping' for list() an tuple() defined the same as for the
> 'for' statement: it has a get_item(i) method that returns either a value or
> raises an exception?
Actually, I think these two want an __len__ method too.
--
Moshe Zadka <moshez at math.huji.ac.il>
There is no IGLU cabal.
http://advogato.org/person/moshez
More information about the Python-list
mailing list