Perl and Python

2008-06-25T12:45:27Z
Dave Pawson.  link
Home

Perl and Python

Perl and Python

Couple of days ago a took a look at using using perl for text hacking. Today, almost out of curiosity but more to practice using classes in python, I tried the same piece of hackery in Python. Makes for an interesting comparison

The perl script shows as 63 lines.

The Python script as 289.

Now I know it's wrapped in quite a few classes, few lines of comments etc, and a better pythoneer could reduce it I'm sure, but 5 times bigger? I guess this shows up the combination of perl and regexen.

Keywords: perl, python

Comments (View)

Return to main index