Python for Perl programmers

A

A.M

Hi,



Is there any efficient online resource or book that help experienced Perl
programmers to Python?



Thank you,

Alan
 
A

Aahz

Is there any efficient online resource or book that help experienced Perl
programmers to Python?

Don't use the Martin Brown book, whatever you do. The Perl/Python
Phrasebook isn't bad, but it's ten years out of date. Really, your best
bet is to just dive into the Python tutorial.
 
J

John J. Lee

A.M said:
Is there any efficient online resource or book that help experienced Perl
programmers to Python?

Worry instead about how you're going to keep maintaining your Perl
code after you've developed an allergic response to it.

<0.5 wink>


John
 
C

Christoph Haas

Is there any efficient online resource or book that help experienced Perl
programmers to Python?

I've been using Perl for a decade and had a hard start into Python. Mainly
because I used those "phrasebooks" and tried to convert my Perl syntax
statement-by-statement. However Python doesn't just have another syntax but
also other concepts. It's worth working yourself through the diveintopython
tutorial. Or if you want to spend money I strongly recommend the book
"Beginning Python: From Novice to Professional" (ISBN 159059519X) because
you learn a lot about daily problems and gotchas, too.

Besides from the "I'm cool because I'm the only one who can read my code"
factor that Perl delivers Python has everything you need. :)

Kindly
Christoph
 
B

bruno at modulix

A.M said:
Hi,

Is there any efficient online resource or book that help experienced Perl
programmers to Python?

My fellow coworker - experimented Perl coder - confirms that the
official tutorial and diveintopython should be enough to get you
started. Also, the Python Cookbook and reading this group may help you
grasp pythonic idioms.
 
A

Alex Martelli

John J. Lee said:
Worry instead about how you're going to keep maintaining your Perl
code after you've developed an allergic response to it.

Nah, that's easy -- you port it to Python (that's what I did back in the
day, and I've heard at least three others relate similar choices).


Alex
 
J

John J. Lee

Nah, that's easy -- you port it to Python (that's what I did back in the
day, and I've heard at least three others relate similar choices).

Or, in my case, throwing away the Perl I had because I found I had
written something much more useful in Python.

A little bit of experience on a smallish (or largish!) from-scratch
Python project does of course make a difference: Perl and Python are
sufficiently close in many things that it's easy to get tunnel vision
when porting Perl to Python. A little knowledge of Python idioms,
techniques, standard library modules, etc., gained outside of that
narrow context, goes a long way to prevent that.

OTOH, the often-mechanical nature of porting .pl->.py, and the great
flexibility of both languages, does certainly make it easier to
switch.


John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,294
Messages
2,571,511
Members
48,206
Latest member
EpifaniaMc

Latest Threads

Top