Python vs. Perl

Thomas Wouters thomas at xs4all.net
Fri May 25 14:33:58 EDT 2001


On Fri, May 25, 2001 at 11:09:27AM -0700, Paul Prescod wrote:

> Maybe you can help me by translating this code which sets up a dictionary
> with keys as tuples of integers (not strings) and values as dictionaries
> of integers to lists.

That's a bit unfair, Paul... Perl doesn't *have* integers that aren't
strings. Perl just has scalars, lists and associative arrays. But the
tuples-as-keys is a huge difference with perl hashes -- as far as I recall,
that isn't possible. Hash keys have to be scalars. I remember that being one
of the top-5 annoyances I had with Perl hashes :)

-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!




More information about the Python-list mailing list