On Tue, Mar 10, 2009 at 12:39 PM, <[email protected]> wrote:
>
>
> John> The only complaint I have there is that mixing tabs and spaces for
> John> indentation should be detected and treated as a syntax error.
>
> Guido's time machine strikes again (fixed in Python 3.x):
>
> % python3.0 ~/tmp/mixed.py
> File "/home/titan/skipm/tmp/mixed.py", line 3
> print(a)
> ^
> TabError: inconsistent use of tabs and spaces in indentation
Or just use the '-tt' command line switch to force indentation consistency:
ksm...@work:~/tmp [366]$ python2.5 -tt mixed.py
File "mixed.py", line 6
print a
^
TabError: inconsistent use of tabs and spaces in indentation
Kurt
--
http://mail.python.org/mailman/listinfo/python-list