Deprecate tabs for indenting (was Re: Indenting with tabs vs spaces)
Michael Abbott
michael at rcp.co.uk
Thu Dec 6 03:17:39 EST 2001
Cliff Wells <logiplexsoftware at earthlink.net> wrote in
news:mailman.1007578213.25934.python-list at python.org:
>> <?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.
>
> I don't even know what to think of this, but since you obviously put
> some time into writing it I felt compelled to reply.
>
I suspect he really meant to write:
<?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>
Now no messy spaces or indentation to worry about.
More information about the Python-list
mailing list