New submission from Camille <[email protected]>:
In the following code :
def g():
return 0
def f():
g = g()
f()
The call to g in f fails due to an UnboundLocalError, while I expected the
assignment to hide the global definition of g. Note that if it is done in two
subsequent calls, i.e. with :
def f():
goo = g()
g = 0
The first assignment still fails.
----------
messages: 322755
nosy: camshaka
priority: normal
severity: normal
status: open
title: UnboundLocalError raised on call to global
type: behavior
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue34291>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com