is this a valid import sequence ?

Scott David Daniels scott.daniels at acm.org
Sun Jun 24 11:20:01 EDT 2007


Steven D'Aprano wrote:
> On Sat, 23 Jun 2007 21:11:42 -0700, Alex Martelli wrote a lot, with lots
> of YELLING.
> 
> Given the amount of SHOUTING in your post, and the fact that you feel so
> strongly about the trivial question of the redundant use of the global
> statement that you would "fail a student" who did it -- even if they did
> everything else correctly, efficiently and elegantly -- it seems to me
> that you are beyond rational discussion on this subject. 

I, for one, appreciate a second voice suggesting that your (Steve's)
vehement rejection of my technically correct and non-condemnatory post
explaining that one use of global in the OP's code was superfluous.

You said (in the previous post):
 > That's technically true, but declaring it with global makes the code
 > self-documenting and therefore easier to read.
 >
 > It's never _wrong_ to use the global statement, even if it is strictly
 > unnecessary for the Python compiler.

Your post led a newbie to presume the extra use of global was "good
style," while I think you'll find there is no such consensus.

--Scott David Daniels
scott.daniels at acm.org



More information about the Python-list mailing list