how do i make an array global

Erik Max Francis max at alcyone.com
Wed Jun 28 18:10:05 EDT 2006


Georg Brandl wrote:

> No need for "global" here.

Yes, that's true.  I was just following the original poster's lead, but 
I tend to use a `global` statement whenever I'm mutating a global in a 
local block.  That works as self-documentation and means you don't have 
to be concerned about the precise case in which it's required, reducing 
bugs when you change a block so that it would have been required if you 
hadn't included it.

-- 
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
  San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
   Seriousness is the only refuge of the shallow.
    -- Oscar Wilde



More information about the Python-list mailing list