WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Xen-devel] [PATCH] [XEND] Remove hard tabs, Mark Williamson <=