[Python-Dev] LOAD_NAME & classes
Wed, 24 Apr 2002 09:38:39 +0200
On Wednesday 24 April 2002 04:40, Greg Ewing wrote:
> Michael Gilfix <email@example.com>:
> > The our is akin to declaring something static in C.
> Except that it sounds like if two functions declare
> "our" variables with the same name, they get the
> same variable, whereas in C they would be different
> variables. (I think -- it just occurred to me that
> I'm not really sure about that!)
You think correctly: two C functions declaring static
function-scope variables with the same name get
different variables. static variables at FILE scope are
'shared' throughout the file, but not between files.