Non-Indented python

Huaiyu Zhu huaiyu at gauss.almadan.ibm.com
Fri Nov 30 04:06:09 CET 2001


On Thu, 29 Nov 2001 15:15:09 -0500, Steve Holden <sholden at holdenweb.com> wrote:
>"Huaiyu Zhu" <huaiyu at gauss.almadan.ibm.com> wrote...
>[Jeff Shannon and Huaiyu go back and forth ...]
>>
>> So the ideal world is all spaces, no tabs.  It is then not a big leap to
>> allow tab as a shorthand to replace the number of spaces used as indent.
>>
>Just because I can hear Peter banging his head on the desk from here, let me
>agree wholeheartedly with your first sentence, and point out that in your
>second sentence you fall again into the error of assuming that a tab will
>always represent a fixed number of spaces.

It does not have to be the same size.

Example:  Consider A and B editing the same file with different editors:

(1) There is no problem if:

    A sets indent=4spc.
    B sets indent=3spc.
    Both sets indent=tab.

(2) The current problem is often caused by:

    A sets tab=8spc.
    B sets tab=4spc.
    Both sets indent=4spc.

Why are these two different?  Because 

- tab can change size with setting.  space can't.
- people want to change indent size or tab size.
- changing indent level will mess up program.

The link indent-tab-space works even when people use different sizes.
The link indent-space-tab works only if everyone used the same size.

But since Tim has spoken I'll stop right here.

Huaiyu



More information about the Python-list mailing list