Deprecate tabs for indenting (was Re: Indenting with tabs vs spaces)

Gerhard Häring gh_pythonlist at gmx.de
Wed Dec 5 01:22:33 EST 2001


Le 04/12/01 à 17:47, Cliff Wells écrivit:
> On Tuesday 04 December 2001 16:58, Tim Peters wrote:
> 
> > I've lost track, but I'm pretty sure it was either because the example
> > used tabs, or because it used spaces.
> 
> After reading this entire thread, I think there are valid arguments on 
> both sides, so I'll be avoiding both tabs and spaces in all my code.

<?xml version="1.0"?>
<!-- fancy doctype declaration here -->
<module name="mypkg.mymodule">
    <class name="MyClass" inherits="OtherClass">
        <method name="__init__">
        <method-params>
            <method-param name="self"/>
            <method-param name="foo" default="None"/>
        </method-params>
        <method-body>
        <global name="tabVsSpacesFlamewarHappening">
        <while-loop>
            <while-loop-condition>
                <value="1"/>
            </while-loop-condition>
            <while-loop-body>
                <pass/>
            </while-loop-body>
        </while-loop>
        </method-body>
    </class>
</python-module>

Better? Seperatation of representation and semantics? The obvious
disadvantage of an XML representation of sourc code would be that we
would need *really good* editors to make it not painful.

Gerhard
-- 
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id 86AB43C0
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))




More information about the Python-list mailing list