Re: [perl-python] 20050118 keyed list

2005-01-18 Thread Jay Tilton
Xah Lee [EMAIL PROTECTED] wrote: : # the syntax of keyed list in Perl is too complex : # to be covered in a short message. You've got to be joking. You couldn't even muster enough skill to provide Perl equivalents for the four simple Python statements you showed? : # see perldoc perldata for

Re: [perl-python] 20050118 keyed list

2005-01-18 Thread Jürgen Exner
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

Re: [perl-python] 20050118 keyed list

2005-01-18 Thread Tassilo v. Parseval
Also sprach Jürgen Exner: Xah Lee wrote: © %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

Re: [perl-python] 20050118 keyed list

2005-01-18 Thread Reinhold Birkenfeld
Jay Tilton wrote: : # the syntax of keyed list in Perl is too complex : # to be covered in a short message. JFTR: keyed lists are called dictionaries in Python. [1]Message-ID: [EMAIL PROTECTED] This guy's wish-wash is starting to be funny, after all! Reinhold --

Re: [perl-python] 20050118 keyed list

2005-01-18 Thread Reinhold Birkenfeld
Jürgen Exner wrote: © # see perldoc perldata for an unix-styled course. Excuse me? Do you mind explaining where exactly perldata is Unix-styled? Remember: Perl == Unix == Satan. Reinhold -- http://mail.python.org/mailman/listinfo/python-list

[perl-python] 20050118 keyed list

2005-01-17 Thread Xah Lee
© # -*- coding: utf-8 -*- © © # in Python, there's a special type of © # data structure called keyed list. it © # is a unordered list of pairs, each © # consists of a key and a value. It is © # also known as dictionary. © © # define a keyed list © aa = {'john':3, 'mary':4, 'jane':5, 'vicky':7} ©