Misuse of <tab>

Michael Sampson milkchug89 at hotmail.com
Wed Jul 30 16:20:46 EDT 2003


How does the IDLE that comes with the latest release of python handle this?
When it automaticly indents does it do it with spaces or tabs?  If you hit
tab in the IDLE will it just put 5 spaces in for you?




"Gisle Vanem" <giva at users.sourceforge.net> wrote in message
news:3f27f0e3$1 at news.broadpark.no...
> 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