TABs (was: Waffling between Python and Ruby)

Darrell Gallion darrell at dorb.com
Tue Jun 20 05:47:32 EDT 2000


 From: "Paul Jackson" <pj at sgi.com>
 >
 > |> 'Tabs will be replaced with %d spaces\n Are you sure
 > |> Y/N:'%tabSize)
 >
 > But a tab isn't 8 spaces, but rather the number of
 > spaces needed to get to the next multiple of 8 column,
 > which might be less than 8 spaces (s/8/tabSize/g, if
 > you must).
 >
Good point.
Although I haven't had a problem and I use this quite a bit.
Maybe because most Python source isn't indented on anything other than \t, 4
or 8 spaces.
After running it I do have some clean up but it's easy to see in any editor
what's needed.

 >
 > The expand/unexpand solution presented in another reply
 > look more promising, in my view.
 >
 I'm mostly on a Windows machine so utils like this are less common.
 I find my self constantly recreating common Unix tools for windows in
 Python.
 Sure I have Cygwin installed but Python runs everywhere.

 --Darrell Gallion









More information about the Python-list mailing list