[Yum] I'm back and future stuff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Don't forget to always use correct spelling and grammar, too!

					-Michael

On Thu, Jun 27, 2002 at 09:41:56PM +0300, 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 ;)
> 
> 
>  brief "python-styling":
>  
>  
>  Indentation
>  
>    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.  ;-/
>  
>  
>    === 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! 
>   
>   
>  Maximum Line Length
>  
>    Guido say: "please limit all lines to a maximum of 79 characters".
>    PEP-8 say: "limiting the length to 72 characters is recommended"
> 
> 
>  Whitespace in Expressions and Statements
>  
>    NO spaces:
>     * Immediately inside parentheses, brackets or braces
>     * Immediately before a comma, semicolon, or colon
>     * Immediately before the open parenthesis    
>     * More than one space around an assignment operator
>     * around the '=' sign when used to indicate a keyword argument or a
>       default parameter value
>  
>    Always put spases:
>     * surround these binary operators with a single space on either side:
>       assignment, comparisons, Booleans
>   
>   In our code we always use one space after comma.  No trailing
>   whitespeces.
>  
> 
>  Comments
>  
>    starts with a # and a single space (unless it is indented text inside
>    the comment)
>  
>   
> -- 
> 		Bor.
> _______________________________________________
> Yum mailing list
> Yum@xxxxxxxxxxxxxxxxxxxx
> https://lists.dulug.duke.edu/mailman/listinfo/yum

-- 
  Michael Stenner                       Office Phone: 919-660-2513
  Duke University, Dept. of Physics       mstenner@xxxxxxxxxxxx
  Box 90305, Durham N.C. 27708-0305


[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux