tabs AND spaces to indent standard libs??

Charles G Waldman cgw at fnal.gov
Tue Aug 8 16:57:28 EDT 2000


hzhu at localhost.localdomain (Huaiyu Zhu) writes:


> The explanation is that the coder 
> - uses the insane default setting of tab=8
> - prefers the sane indentation of 4 spaces
> - still wants to use tab to help typing
> - but forgets to do untabify afterwards

Tab=8 is not "insane".  In fact I would say that setting tab width to
anything other than 8 is insane. 

# ./python
Python 2.0b1 (#3, Aug  8 2000, 14:25:07)  [GCC 2.95.2 19991024 (release)] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
Copyright 1995-2000 Corporation for National Research Initiatives (CNRI)
>>> import string
>>> print len(string.expandtabs('\t'))
8


This (tired) topic is summarized quite nicely at
  
 http://www.jwz.org/doc/tabs-vs-spaces.html

which should be required reading for anybody who brings up this topic!



More information about the Python-list mailing list