tabs AND spaces to indent standard libs??

G. David Kuhlman dkuhlman at netcom.com
Wed Aug 9 20:45:15 EDT 2000


Let me also get behind this criticism.

I try to encourage people to use python.  I have hope that I can
explain consistent tab usage.  In fact, I love python's use of
indenting instead of begin/end brackets.  However, explaining and
justifying inconsistent usage is beyond me.

Anything that does not pass the "python -t" test should be fixed. 
Try:

D:\Python\Python-1.5.2\Lib>python -t rfc822.py
rfc822.py: inconsistent tab/space usage
Traceback (innermost last):
  File "rfc822.py", line 883, in ?
    file = os.path.join(os.environ['HOME'], 'Mail/inbox/1')
  File "d:\stinstall\lib\os.py", line 247, in __getitem__
    return self.data[string.upper(key)]
KeyError: HOME


  - Dave


> 
> The only reason I can think of for doing it the way it was done, is so
> that people can dump it to the screen without each line of code
> indenting 8 characters.  If that was the case, I still don't think it
> makes up for the mess it creates when people try to cut and paste the
> code into their apps...
> 



More information about the Python-list mailing list