Non-Indented python
Chris Barker
chrishbarker at home.net
Thu Nov 29 13:05:19 EST 2001
Tim Peters wrote:
> > If it is true that there is general consensus about this, is there any
> > movement to disallow it altogether in the Python interpreter?
>
> Nope. The "nanny" in "tabnanny" is there for a reason: grownups have no
> problems here.
I don't think that's true. I often start working on a file I got from
elsewhere with tabs in it, get some wierd error, eventually think to
check for tabs. Then I run a script on it, clean it up, and all is well.
This would be a WHOLE LOT easier if I got a "syntax error: mixed tabs
and spaces" the first time I ran it. And what would we lose???
There are a lot of issue swith backward compatabilty, but this is one
cse where you could run a simple script over any previously valid code
and get valid code back. No problem there.
By the way, speaking of editors, I think any "Decent Editor" should
provide a way to display a special charactor in place of a tab, so that
I can SEE what is in the file. I havn't found a way to get XEmacs to to
that.
> > Personally, I would prefer that future versions of Python would allow
> > ONLY tabs or ONLY spaces, but clearly there would be a major
> > disagreement about which to use.
>
> It would be spaces -- "4-space indents, no hard tab characters anywhere" is
> the coding standard for the Python library.
I imagine Huaiyu, if no one else, would take issue with this.
-Chris
--
Christopher Barker,
Ph.D.
ChrisHBarker at home.net --- --- ---
http://members.home.net/barkerlohmann ---@@ -----@@ -----@@
------@@@ ------@@@ ------@@@
Oil Spill Modeling ------ @ ------ @ ------ @
Water Resources Engineering ------- --------- --------
Coastal and Fluvial Hydrodynamics --------------------------------------
------------------------------------------------------------------------
More information about the Python-list
mailing list