Style question...

U. N. Owen electricity at uymail.com
Thu Aug 28 02:23:28 EDT 2003


Re: Anthony Roberts wrote:
Re: > 
Re: > If I end indentation levels with "pass" statements, will I piss off people
Re: > that have to read my code? eg:
Re: > 
Re: > for i in xrange(0,5):
Re: >     if i:
Re: >         print i
Re: >         pass
Re: >     print i * -1
Re: >     pass
Re: > 
Re: > I ask for two reasons... a) it helps emacs figure it out, and b) I'm more
Re: > comfortable ending compound statements with a token.
Re: 
Re: Sorry, but yes, I find that ugly.  If you're just starting out with 
Re: Python, please just give it a shot without that approach for a while
Re: and see whether you become much more comfortable *without* the token
Re: than you ever were with it.
Re: 
Re: -Peter
Re: -- 


Sorry, but no ;-) Ok it's "one line more", and
is not very useful. But...
For the moment I work on (a small part of) a project
that has hundreds of thousands of lines, almost
eveything in Python (and some in C and Fortran),
and when you have a loop several pages long, or
nested blocks to 8 levels or more, I may say
it's *very* convenient to see where the end
of a block exactly is. It's convenient to
have some long variable names too.
-- 
_______________________________________________
Get your free email from http://www.uymail.com

Powered by Outblaze





More information about the Python-list mailing list