[ale] intro to python for the experienced programmer

Fletch fletch at phydeaux.org
Thu Feb 14 11:41:24 EST 2002


>>>>> "John" == John Wells <jbwellsiv at yahoo.com> writes:

    John> I've been playing with the notion of learning python for
    John> some time now, and my curiosity is slowly getting the better
    John> of me.

        Speaking as a perl person who's trying to learn enough to
fully justify my innate loathing :), I picked up enough to be somewhat
dangerous from the tutorial and language manual available from
python.org that others have mentioned.  

        It was enough to pick up the fundamentals (at least enough to
be dangerous to diddle with some little XMLRPC clients; and I will
admit that the python xmlrpclib is pretty transparent), but I did have
to bounce onto #python to get a couple of questions answered (for
example, I was trying to do the equivalent of

sort { $a->{key} <=> $b->{key} } @loh

in perl on a list of dictionaries, and none of the docs I was looking
at mentioned that you could pass a lambda expression to the sort()
method of a list

active.sort( lambda a, b: cmp( a["key"], b["key"] ) )

Gosh, that's so much more concise. :).


        I also saw this book at Borders the other day, but didn't do
more than flip through it so I can't do much more than point out its
existence.


Perl to Python Migration

Martin Brown
Addison-Wesley, Published November 2001, 299 pages
ISBN 0201734885


-- 
Fletch                | "If you find my answers frightening,       __`'/|
fletch at phydeaux.org   |  Vincent, you should cease askin'          \ o.O'
770 933-0600 x211(w)  |  scary questions." -- Jules                =(___)=
                      |                                               U

---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list