[Yum] I'm back and future stuff

seth vidal skvidal at phy.duke.edu
Fri Jun 28 04:14:08 UTC 2002


On Thu, 2002-06-27 at 14:41, Vladimir Bormotov wrote:
> 
> 		Hi!
> 
> SV> I think I will tend to agree with linus, big patches suck. Can you
> SV> isolate what they are patching? ie: a reget patch, a tabbing patch, a
> SV> doc patch etc etc.
> 
>  You can help to minimize patches.
>  
>  just read  
>  
>  http://www.python.org/doc/essays/styleguide.html 
>  http://www.python.org/peps/pep-0008.html
>   
>  and aplly style recomendation to source code as rules ;)
> 





>  
>    4 spaces for one level.  
>    
>    for example, look at yum-0.8.9/lilo.py, class LiloConfigFile.
>    
>    cass declaration at first posotion.  Nice.
>    def __repr__ - indented with 4 spaces.  Very nice.
>    s = "" indented with one tab character.  Ooops!!!!
>    
>    look below, into def needsEnterpriseKernel:  
>    
>    for l in f.readlines() indented with 4 spaces, but body indented with
>    tab character.  ;-/

humorously I didn't write this function at all. I stole it from up2date
:)


>    === styleguide cut ===
>    Tabs or Spaces?
>  
>     Never mix tabs and spaces. The most popular way of indenting Python is
>     with spaces only.
>    === 
>    
>   Please, NO TAB CHAR IN PYTHON CODE! 

so a couple of things about this.

When I started working in python I was told - pick one, tabs or spaces
and go with it.

I did.
 Thats why everything is tabbed. Unless I stole the code, then its
whatever they used.

switching is one regex away :) if people like spaces, thats fine with
me, my editor does either. I don't really have a strong preference.

-sv

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
Url : http://lists.baseurl.org/pipermail/yum/attachments/20020628/0df9ebc9/attachment-0001.pgp 


More information about the Yum mailing list