From: Mark Williamson Subject: Re: [PATCH] [XEND] Remove hard tabs Date: Thu, 12 Oct 2006 17:33:53 +0100 Message-ID: <200610121733.53846.mark.williamson@cl.cam.ac.uk> References: <62b0912f0609202258k6d399871tad27827ddb9b1137@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <62b0912f0609202258k6d399871tad27827ddb9b1137@mail.gmail.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Molle Bestefich , Hollis Blanchard List-Id: xen-devel@lists.xenproject.org > > [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@lists.xensource.com > 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!