tabs do WHAT?

Tim Peters tim_one at email.msn.com
Sun Jan 23 23:45:58 EST 2000


[Warren Postma]
> Let's see how many languages I have run into that make
> whitespace and/or tabs important:

Whitespace?  Now *that's* a novel topic c.l.py hasn't seen enough of lately
<wink>.

> ...
> As an embedded language, Python needs to be usable beyond the
> ivory towers where functional programming or object oriented
> programming or metaclasses are fodder for discussion.

Python didn't come from an ivory tower, and indeed even Perl may be more
heavily used in those fabled lands.

> Python looked eminently useable by non-programmers until I found
> out that whitespace was meaningful.  Try to explain scope to
> someone who doesn't write programs for a living.

This one is ironic:  Python's treatment of block structure came from formal
usability studies (conducted with the ABC language), using subjects who
indeed didn't write programs for a living.  "Introductory colon +
indentation" is what worked best -- they tried the others too.  See recent
msgs in DejaNews for more about that.

> ...
> Has anyone built a version of Python that totally ignores
> tabs and whitespace,

Yes, a patch for that was posted many years ago; it didn't catch on.

> or a filter that you can use on top of Python?

See Tools/Scripts/pindent.py in the std distribution.

although-i'm-not-sure-it's-ever-been-run<wink>-ly y'rs  - tim






More information about the Python-list mailing list