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] remove tabs from xm/main.py

To: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] remove tabs from xm/main.py
From: aq <aquynh@xxxxxxxxx>
Date: Thu, 19 May 2005 00:44:42 +0900
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 18 May 2005 15:44:09 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=EPYSGcK5t+SeayE3g91bmx4PaR81k44iXdwQ5cXdCF/01xV3CVP7l6oP0DeRflIqpIRAd8hOhuNdj6t2S1VSz+R1nZtIpjnU6VKXCNA1RY6QcgqHGk9ZVGiq9wvKfJ1IX/R3alHc+k4SKIbXJho5zSxtuLe/7/S00hcdoHPByG8=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <A95E2296287EAD4EB592B5DEEFCE0E9D1E40A7@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <A95E2296287EAD4EB592B5DEEFCE0E9D1E40A7@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Reply-to: aq <aquynh@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On 5/18/05, Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx> wrote:
> > while investigating xm/main.py, i found that it is mixed with
> > tabs and whitespaces. that is annoying and may get us
> > misleaded when reading code. looks like that the conventional
> > coding style of Python (and also C?) in Xen is to use (4)
> > whitespaces instead of tabs? could anybody confirm this?
> >
> > i searched in all tree and found bunch of files like this. if
> > nobody complains, i will catch them all (both C and Python
> > codes) and send in
> > 1 patch to the list. any idea?
> >
> > this patch replace tab with 4 whitespaces in (only) xm/main.py
> 
> Particularly for python, this kind of patch can be *really* dangerous.
> Please can you confirm that you fully understand the python indentation
> rules (I don't), and that the patch was generated mechanically by a
> script.

yes, indentation for C codes is not that important, but that is a
serious problem with Python. you are always adviced to *never* mix tab
and space when indenting Python code. that is *evil*. we must consider
this as bug, and fix them all.

looks like all the Python code use 4 spaces to identation. could any
developers who wrote those code confirm that they set tab as 4 spaces
in their editor?

i will try to fix all the tabs by replacing them with 4 spaces, check
it carefully to make sure no error is introduced, and send in the
patch (for Python code only).

regards,
aq

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

<Prev in Thread] Current Thread [Next in Thread>