[Python-Dev] just trying to catch up with the semantic

Greg Ewing greg@cosc.canterbury.ac.nz
Fri, 02 Mar 2001 10:54:45 +1300 (NZDT)


Jeremy:

> My preference is that global kills the local-decl only in one scope.

I agree, because otherwise there would be no way of
*undoing* the effect of a global in an outer scope.

The way things are, I can write a function

  def f():
    x = 3
    return x

and be assured that x will always be local, no matter what
environment I move the function into. I like this property.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg@cosc.canterbury.ac.nz	   +--------------------------------------+