From mboxrd@z Thu Jan 1 00:00:00 1970 From: aq Subject: Re: [PATCH] remove tabs from xm/main.py Date: Thu, 19 May 2005 00:44:42 +0900 Message-ID: <9cde8bff0505180844516d75f5@mail.gmail.com> References: Reply-To: aq Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: 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: Ian Pratt Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On 5/18/05, Ian Pratt 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 >=20 > 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