Misuse of <tab>

Gisle Vanem giva at users.sourceforge.net
Wed Jul 30 12:20:48 EDT 2003


I'm a .py newbie and fascinated by the simplicity of formatting.
No need for {} as in Perl etc. But the misuse of <tab> that many
.py writers do makes it hard to understand how a script operates.

E.g.

def main():
   terminate = 0
   def foo():
       line = sys.stdin.readline()
<tab>  try:
        bar()
    except:
        terminate = 1

main()

Now, with an editor with different tab-settings it's difficult to see where
the try statement belongs. In 'def main()' or in 'def foo()' ?
I'm confused, please enlighten me.

--gv






More information about the Python-list mailing list