Python vs. Perl

Jonathan Gardner gardner at
Tue May 29 20:12:48 CEST 2001

On Saturday 26 May 2001 02:17 am, Thomas Wouters wrote:
> The => token simply quotes the preceding token, and then translates
> itself into a comma. So
>  {key1 => 'value1', key2 => 'value2'};
> is the same as the second example above.

Which stinks, because you have to make sure that 'key1' is a token. For 
instance, you can't do this:

(1=>'one', the second one=>'two')

because '1' won't be quoted, and 'the second one' has spaces. So it's a 
Neat Trick (TM) that you can only use once in a while.

Which kind of makes it confusing for everyone involved. Why even have that 
behavior if it works only in certain instances?

As a sidenote, I was reading that if you have a barewored (which 'the', 
'second', 'one' all are) they are considered to be quoted in earlier 
versions of perl.

Which is further proof that perl is a very confusing language.

Jonathan Gardner
Software Engineer, CarDomain Networks
(425) 820-2244 x123
gardner at

More information about the Python-list mailing list