Python vs. Perl

Paul Prescod paulp at ActiveState.com
Thu May 24 22:12:00 EDT 2001


Jonathan Gardner wrote:
> 
>...
> 
> Also, I don't think anyone can claim that Python's dicts are better than
> Perl's hashes or C++ STL's map. Well, maybe Perl's hashes are a little better
> because you can do so much stuff with it in so many ways...

I make that claim. It is trivial in Python to make dictionaries of
dictionaries. It is harder in the other languages. It is also possible
to use almost any object as the key. You can also have hashes of pairs,
triples, or n-tuples of objects. Also, any object can choose how to
represent itself in terms of a hash.

-- 
Take a recipe. Leave a recipe.  
Python Cookbook!  http://www.ActiveState.com/pythoncookbook




More information about the Python-list mailing list