[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] [XEND] Remove hard tabs



> > [XEND] Remove hard tabs.
>
> That's stupid, tabs are a relief to use when coding compared to spaces.

The important thing is that we try to have only tabs, or only spaces.  As far 
as I know, we've chosen the latter.

The interaction between Python's interpretation of tabs as 8 spaces, vs some 
indents actually being spaces, and some being a mixture of the two makes for 
very brittle code: it's very easy to change code semantics by changing 
indentation.

This gets especially hairy if (for instance) somebody has a text editor not 
set to display tabs as 8 spaces, and / or which uses auto-indenting.

We could really add a test to the staging repository that scans every .py file 
and grumbles if any tabs have arrived.

Cheers,
Mark

> > -       if type(devid) is str:
> > -           devicePath = '%s/device/%s' % (self.dompath, deviceClass)
> > -           for entry in xstransact.List(devicePath):
> > -               backend = xstransact.Read('%s/%s' % (devicePath, entry),
> > "backend") -               devName = xstransact.Read(backend, "dev")
> >
> > +        if type(devid) is str:
> > +            devicePath = '%s/device/%s' % (self.dompath, deviceClass)
> > +            for entry in xstransact.List(devicePath):
> > +            backend = xstransact.Read('%s/%s' % (devicePath, entry),
> > "backend") +            devName = xstransact.Read(backend, "dev")
>
> Seems to me like you're breaking Python indentation rules now?
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel

-- 
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.