Python vs. Perl, which is better to learn?

David J. Ritchie ritchie at fnal.gov
Thu May 9 18:19:16 EDT 2002


Bjorn Pettersen wrote:

> > From: geek [mailto:geek+ at andrew.cmu.edu]
> >
> ...
>
> > Eventually I'll factor out some code and use cut-and-paste to
> > create a new function.  Pretty often I have to indent/dedent
> > to make the old code match the new block.  It's no biggie,
> > though, 'cause I use xemacs so I can just C-c < or C-c > as necessary.
>
> Can we assume that you would reindent the code to fit the surroundings
> if you were writing in e.g. C also?
>
> -- bjorn

But of course the point is that if you didn't quite do it just exactly
right, but left whatever block delimiters the language had in place,
it would not have a disastrous effect on the execution logic.

Again, it's great that Python forces you to get the indentation
right but it does mean that there is a sensitivity to context in the way
things are interpreted.

White space matters whether T.S. Eliot poetry
( http://people.a2000.nl/avanarum/Waste_notes/Waste_A.htm )
or Python...

--D.

--
ritchie at fnal.gov





More information about the Python-list mailing list