Python scoping

Steven D. Majewski sdm7g at virginia.edu
Thu Oct 26 15:39:13 EDT 2000


On Thu, 26 Oct 2000, William Park wrote:

> 
> Good programmers always use indentation, with or without braces.  But, I
> personally wouldn't mind "end" statements (ie. endif, endfor, endwhile,
> etc.) for situations where blocks are longer than one screen.
> 

I try to keep my blocks and functions short enough to be easily readable,
but yes: there are times when they have to be longer than a page. But 
in those cases, even with a block delimiter, I find I need to use 
additional comments: 'endif' isn't enough because I probably have
multiple if statements, so I need "endif (test-condition)" to match
up with "if (test-condition)". 
 I don't know of any programming languages that are quite that verbose,
and I'm not sure I would like it since the shorter one-page cases 
vastly prevail, so I might as well use comments for those exceptional
cases. ( And it's not any harder to use comments with "offside rule" 
block structure than it is with explicit end tokens. ) 

---|  Steven D. Majewski   (804-982-0831)  <sdm7g at Virginia.EDU>  |---
---|  Department of Molecular Physiology and Biological Physics  |---
---|  University of Virginia             Health Sciences Center  |---
---|  P.O. Box 10011            Charlottesville, VA  22906-0011  |---
		"All operating systems want to be unix, 
		 All programming languages want to be lisp." 





More information about the Python-list mailing list