list_to_dict()

Michael Hudson mwh at python.net
Fri Jan 17 06:27:14 EST 2003


maney at pobox.com writes:

> > and the list comprehension a the same time (OTOH, it relies on lists
> > having a __getitem__):
> 
> But I *like* list comprehensions!  <wink>
> 
> Okay, to work with older versions.  Is __getitem__ itself relatively
> recent?

[].__getitem__ is only there in 2.2 and later.

Cheers,
M.


-- 
  I have a cat, so I know that when she digs her very sharp claws into
  my chest or stomach it's really a sign of affection, but I don't see
  any reason for programming languages to show affection with pain.
                                        -- Erik Naggum, comp.lang.lisp




More information about the Python-list mailing list