PHP5 programmer learning Python

romiro rrogers82 at gmail.com
Sun May 27 11:41:36 EDT 2007


Hi all,

I'm a PHP5 developer looking to "broaden my horizons" so to speak by
learning a new language. I emphasize the 5 in PHP since I have fully
engrossed myself in the full OOP of version 5 with my own ground-up
projects as well as some work with PRADO (http://pradosoft.com)

I've dabbled with a number of languages in the past, Python being no
exception, but always ended up coming back to PHP due to being
comfortable with it.  Python has stuck to me as a language I _really_
think I should know more about.  I've recently tried C#, a very short
lived re-attempt at C++ and Java, and Ruby.  None of those seemed
"fun" except for Ruby, although from what I've seen the syntax between
Ruby and Python are very similar to each other compared to the other
languages.

Anyway, my first question was if anyone knows of a tutorial that
focuses on PHP -> Python learning, in such that there might be a block
of PHP code alongside an example of how to do the same thing in
Python.  One example of something I've already mapped a comparison to
thanks to standard tutorials is a PHP numeric indexed array being
similar to a list and a PHP associative array being similar to a
dictionary.  Of course finding such of a tutorial isn't a deal breaker
by any means, but I figured that having it available would be a boon
for me to actually make some headway in my Python learning adventure.

If there's anything else that could be said about the migration
between the two languages, I'm all ears. I also don't really need to
hear about how "disgusting" php is as a language...I am aware of the
contained chaos that is PHP4, which is why I develop strictly in 5
using its OOP to the extent my feeble brain allows, a wariness toward
the insecure pitfalls the language has begat in the past, and an
attempt to produce as clean of a syntax as the language can allow.

Thanks in advance for any help.




More information about the Python-list mailing list