BJörn Lindqvist wrote:
> I think the fix for that is to remove the "scope inheritance." I.e:
>
> cache = None
> def init():
> if not cache:
> pass
>
> Throws a NameError because cache is not declared in function init's
> scope.
And do you want
def f():
print "Eff!"
def g():
f()
g()
to throw a NameError, too? If not, how do you tell
the difference?
--
Greg
_______________________________________________
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