Misuse of <tab>

Donald 'Paddy' McCarthy paddy3118 at netscape.netNOTthisBIT
Wed Jul 30 13:26:35 EDT 2003


Gisle Vanem wrote:
> 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.
<<SNIP>>
> 
> 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.

The usual rule is to either:
	1) Don't use tabs for indentation at all. Or
	2) If you must use tabs, then always use just tabs/

If you have an editor that might automatically change several spaces to 
tabs then turn that feature off or don't use the editor.

Cheers, Pad.






More information about the Python-list mailing list