Xah Lee wrote:
> � # in perl, keyed-list is done like this:
Just FYI: those thingies are called hashes. The legacy name would be
associative array.
> � %a = ('john',3, 'mary', 4, 'jane', 5, 'vicky',7);
> � use Data::Dumper qw(Dumper);
> � print Dumper \%a;
Wow, my compliments. The very first time that using Data::Dumper actually
may do something useful (formats the data more nicely). Still, why you are
passing a reference is beyond me.
> � # the syntax of keyed list in Perl is too complex
> � # to be covered in a short message.
Excuse me? If (using the same examples as for your Python section)
print "Mary is $a{mary}";
delete $a{vicky}; print %a;
print keys(%a);
exists $a{mary};
is too complex for your to cover, then I strongly suggest you stop posting
your "explanations".
> � # see "perldoc perldata" for an unix-styled course.
Excuse me? Do you mind explaining where exactly perldata is "Unix-styled"?
jue
--
http://mail.python.org/mailman/listinfo/python-list