Python vs. Perl, which is better to learn?

David J. Ritchie ritchie at fnal.gov
Fri May 10 15:02:04 EDT 2002


Aahz wrote:

> In article <3CDAF2A7.2DADEB14 at fnal.gov>,....
>
> I guess I was carping at your point because I see it as an issue in most
> programming languages (I'm tempted to say "all", but I know better than
> to make foolish overgeneralizations ;-): how does one suitably indicate
> blocks of code for editing?

Yes, I tend to agree with you--I was probably stretching things to find
a Python example of context sensitivity...however you slice it, you will probably
have block delimiters.  In Perl's case, they are { and } while in Python
they are      and     .  So, what's the diff..., it's only an artifact of our
having editors that treat a window of characters as made up of lines
that there is any difference.  If our editors from the beginning had
let us identify an irregularly shaped "patch" of text in the lower right
quadrant and cut and paste that much like a drawing program, I would
be thinking about this much differently.  Then, we'd have the problem
of how to designate what meant sequential execution from one 'patch'
of code to another.

--D.




More information about the Python-list mailing list