Why Python style guide (PEP-8) says 4 space indents instead of 8 space??? 8 space indents ever ok??

Erik Max Francis max at alcyone.com
Sun Oct 26 20:03:08 EST 2003


Dave Kuhlman wrote:

> If you are on Linux/UNIX or have access to the cygwin tools on MS
> Windows, then try:
> 
>     unexpand -4 orig.py > tmp.py
>     expand -2 tmp.py > dest.py
> 
> to convert from 4-space indents to 2-space indents, and
> 
>     unexpand -2 orig.py > tmp.py
>     expand -4 tmp.py > dest.py
> 
> to convert from 2-space indents to 4-space indents.

Blasphemy!  Use a pipe and avoid the need for the temporary file
altogether:

	unexpand -4 orig.py | expand -2 > dest.py

etc.

-- 
   Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
 __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/  \ To endure what is unendurable is true endurance.
\__/  (a Japanese proverb)




More information about the Python-list mailing list