Re: Python versus Perl ?

From: Alex Martelli (aleaxit_at_yahoo.com)
Date: 02/06/05


Date: Sun, 6 Feb 2005 17:07:31 +0100

Reinhold Birkenfeld <reinhold-birkenfeld-nospam@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



Relevant Pages

  • Re: Python versus Perl
    ... > efficient language would be for our purposes. ... > 1 - How does the speed of execution of Perl compares to that of Python? ... > noticed that Regular Expressions are executed very fast in Python. ...
    (comp.lang.python)
  • Re: Python or PHP?
    ... If it's one of the things for which Python ... every language here and there more ways to do something. ... you make Perl more complicated than it is:-D. ... Not the programmer. ...
    (comp.lang.python)
  • Recommend an E-book Meeting the Following Criteria (Newbie, Long)
    ... I know several programming languages namely Java, Perl and C in this order ... Now I'm wondering which Python book I should get as there are so many out ... I'd like to mostly concentrate on language features but some pointers ...
    (comp.lang.python)
  • Re: Choosing Perl/Python for my particular niche
    ... >> For most general purpose tasks, I reach for Python first. ... > syntax and perhaps my lack of bottomless commitment (knowing Perl would not be ... verilog) so that it can be used for another e.g. verilator, ... using a standalone simulator to simulate the original verilog. ...
    (comp.lang.perl.misc)
  • Re: Choosing Perl/Python for my particular niche
    ... >> For most general purpose tasks, I reach for Python first. ... > syntax and perhaps my lack of bottomless commitment (knowing Perl would not be ... verilog) so that it can be used for another e.g. verilator, ... using a standalone simulator to simulate the original verilog. ...
    (comp.lang.python)