Why self?

Matt Gerrans mgerrans at mindspring.com
Thu Jul 11 03:28:50 EDT 2002


> ... Indentation is good, and improves readability, but I
> always indent with tabs...

Tabs were only useful in the days when all the source, compiler and
libraries were on a 360K floppy and every byte was jealously hoarded.   Now,
in the 21st century, they are nothing but a source of confusion (I always
use an editor that shows them explicitly, because they have occasionally
caused great strife in Python and make files).    If you always just used
three spaces, you wouldn't have any of these problems in Python.

I think the use of indentation for scoping is one of the greatest things
about Python: why clutter up the code with curly braces, which are just
information for the compiler?   We already use indentation (in C/C++, Java,
etc.), so why not make use of that information, throw out the extra typing
of curlies (as well as the concomitant religious wars over their placement)
and enforce its meaning and consistency?

By the way, if you are more enamored of the lexical approach, you might be
more interested Ruby.





More information about the Python-list mailing list