Collective memory

Irmen de Jong irmen at -NOSPAM-REMOVETHIS-xs4all.nl
Sat Jul 5 12:57:24 CEST 2003


Charles Shannon Hendrix wrote:
 > Python uses it for actually determining the logic in your program, which
 > IMHO is dangerous.
 >
 >     if <something>
 >         <work>
 >         <more work>
 >         <add numbers>
 >
 > Is <add numbers> part of the if statement, or did someone with different
 > tab settings from the author make a mistake and align it accidentally?

To catch such mistakes, Python has the -tt command line option:
-t     : issue warnings about inconsistent tab usage (-tt: issue errors)

There's also tabnanny.py in the standard library to check things
before executing code. I'm not sure, but I suspect that PyChecker
also checks this.


--Irmen





More information about the Python-list mailing list