"Delaney, Timothy (Tim)" <[EMAIL PROTECTED]> wrote:
> If "global" were to change in Py3K to require an existing binding at the
> time the "global" keyword was executed, this would then have the
> semantics of "nonlocal" and be context-independent again. So I think any
> proposal to reuse "global" has to include these semantics.
Maybe, but it would break currently existing (and working) code like the
following...
#no foo = declaration
def init_foo():
global foo
foo = ...
I use variants of the above in a few places. Could I initialize foo =
None in the module namespace prior to running init_foo()? Sure, but
that may or may not clutter up definitions contained in the module.
- Josiah
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com