No subject


Sun Nov 12 08:01:13 CET 2006


                 a.get(k[, f]) the item of a with key k (4)
   (4)
          Never raises an exception if k is not in the map, instead it
          returns f. f is optional, when not provided and k is not in the
          map, None is returned.

This makes dictionary types behave in a Perl-hash-like manner, which is
sometimes a good thing.

Note that this idiom is (I think) more efficient, and shorter.
--
Moshe Zadka <mzadka at geocities.com>. 
QOTD: What fun to me! I'm not signing permanent.






More information about the Python-list mailing list