[Pythonmac-SIG] Indentation Styles

Tom Fetherston ranch1@earthlink.net
Sat, 25 Nov 2000 09:12:06 -0500


Hi all,

Having opened a few of the files in the distribution, it seems to me that
the indenting of statements is using "only-tabs" style, is this (or should
this be) the default behavior on the Mac?  Some of the contributions use
the "all-spaces" form of indentation, but that seems to be just the their
preference.

Does ide/idle have one of this set as the default?

There is a "Warn about inconsistent tab usage" check box in the
pythonInterpreter run options dialog, could someone elaborate on what
python does to check this (and/or point me to module that does this if it
isn't hard coded in C?).

I tried the above with what I thought should have been legal indenting --
"unix-like" where one indent is four spaces, multiple indents are made up
of tabs (equivalent to eight spaces) for the even portion of the indent,
and an actual four spaces make up the the odd remainder (if any).  Seems
that the above setting  complained about this.

I'm looking at all this to set up how my editor handles python files.  I
figure that I should make the default behavior be to have all file with mac
line endings use tabs for indentation, and have tabs display as the
equivalent of four spaces.  Opening files with other styles/line-endings
that have consistant indentation would present a dialog asking if you wish
to convert them.  Inconsistant styles would just open with a warning fix
the indentation.  To simplfy things for those working on files that are
intended for other systems, the path name will be parsed, and if one of the
folders is the path is either "unix" or "ibm" then the defualt behavoir
will be over-riden, and the file will open for editing in that
style/line-endings.

What should the default style be for ibm stuff.

Any comments or suggestion would be appreciated.

Tom