Python Rocks!

Tim Peters tim_one at email.msn.com
Wed Jan 19 00:28:58 EST 2000


[tye4 and Tom Culliton bump heads over whitespace -- who
 could have imagined that the absence of something could
 leave such a dent <wink>?
]

[tye4]
> Are you insinuating that this is not a problem since I'm
> not as experienced as Guido?  I don't need to design a
> language to detect flaws in it.

Indeed not, but it would help your case had you *used* Python for quite a
while before asserting your position so absolutely.  Whitespace flames are
historically common on c.l.py, and for every one who comes along insisting:

> This problem needs to be fixed.

at the start, there are many more who change their minds a few months later.

A long time ago I wrote a program to tabulate the distribution of function
sizes in the std Python library (a great deal of which is written in
Python); the median (not counting blank lines and comments) was six(!)
lines.  Python is a very high-level language, and when functions don't
slobber over pages (as they too often do in, say, C or Java), indentation is
dandy for denoting block structure.  I would hate to try maintaining C
without curlies (or Pascal without "end"s, or ...), but well-written Python
is a joy without the noise.

> That's because indentation is highly dependent on what
> text editor you use. Some editors convert tabs to spaces
> some don't. Only way around that would be not use tabs...

You will find comfortable ways to live with it, provided only you're not
determined to let this stop you <0.7 wink>).  From Notepad to Emacs, it's
just not a real problem in practice.

> ...
> Unfortunately, it's hard to change basic syntax of a language.

At this point, flatly impossible.  Guido's last word on the subject can be
found in Tools/Scripts/pindent.py.

often-mentioned-never-used<wink>-ly y'rs  - tim






More information about the Python-list mailing list