20 Stages of Perl to Python Conversion

Andrew Dalke dalke at dalkescientific.com
Fri Aug 16 02:06:27 EDT 2002


Carl Banks:
> 4. Decide instead to push on in disbelief.  Encounter the part of the
> tutorial about modules.  Become utterly aghast that Python does not
> place high importance on data hiding.  Think, "Python not supporting
> data hiding goes against every fundamental principle of object
> oriented programming I know (especially since I've also been led to
> believe C++ is the beginning and end of OOP)."

Seems out of place.  Perl doesn't have much in the way of data
hiding either.


On the other hand, I suggest a paragraph on thinking that Python
regular expressions are cumbersome to use then realize that
string methods are so much clearer for most things.

Or, more generically, write the Perl flavored Python code and
complain that it's complicated, verbose, and slow compared to
the original Perl code.  Then after talking with someone with
a bit more Python experience, you realize there is a more
Pythonic way which fixes all those problems.

					Andrew
					dalke at dalkescientific.com




More information about the Python-list mailing list