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
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
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
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
--
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
© # -*- 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}
©