Python versus Perl ?

Alex Martelli aleaxit at yahoo.com
Sun Feb 6 11:07:31 EST 2005


Reinhold Birkenfeld <reinhold-birkenfeld-nospam at wolke7.net> wrote:
   ...
> > Perl also has excellent pattern matching compared to
> > sed, not sure about how Python measures up,
> >  but this seems to make perl ideally suited to text processing.
> 
> Python has regular expressions much like Perl. The only difference is
> that Perl carries syntactic support for them, while in Python regular
> expressions are ordinary objects with methods etc.

In many ways, Python's modularity is advantageous here.  However, since
(I believe) about Perl 5.2 or so, Perl's regular expressions aren't --
they're more powerful than regular expressions, because you can embed
arbitrary Perl code in them as part of the matching process.  Python's
regular expressions are very close to those of Perl 5.X for some X<2 (I
think it was 5.2 where the code-embedding trick was introduced, but
that's something of a guess on my part).

> > I also did a search of job
> > postings on a popular website. 108 jobs where listed that require
> > knowledge of Perl, only 17 listed required Python. Becomeing more
> > familiar with Perl might then be usefull for ones resume ?
> 
> It doesn't harm, of course. Recent statistics about programmers'
> salaries indicate, however, that Python ranks top (I somehow lost the URL).

"Software Development" magazine has run such polls for years, and the
fact that Pythonistas' salaries are at the top has been true since the
first such poll -- not a huge difference, but statistically significant.
What this finding _means_ is, of course, somewhat of a mystery
(correlation isn't causation), as is, of course, the OP's less formal
observation about job postings.


Alex



More information about the Python-list mailing list