Perl Vs Python

Alex Martelli aleax at
Thu Feb 27 13:28:21 CET 2003

Max M wrote:
> I was impressed by the regular expressions in Perl, and used them all
> I thought Python looked fine, but it didn't have integrated regular
> And surprisingly enough, I rarely use regular expressions any more.
> There are usually simpler and better ways of doing it for most problems.

Yes, but, the fact that regular expressions are not "integrated"
in Python (you have to "import re" to get them) is not really a
problem at all.  Even those of us who THINK in re's (e.g. because
of long frequentation of vi, grep and the like;-) have no real
problem, I've found, with myre=re.compile(...) then myre.match(...).

Migratinge the re's was a breeze when I rewrote all Perl scripts
I had ever written into Python, early in my Python experience.

So, I'd keep the issue of whether re's are a good thing or not
quite separate from the issue of language choice.  Even if you
DO breathe and drink re's, Python's quite possibly best anyway.


More information about the Python-list mailing list