Message288023
Raymond Hettinger reported during PyCon Canada 2016 Keynote (~20m30 sec)
that unbound local error message was inaccurate, it state that :
> local variable 'xxx' referenced before assignment
Though it can be assigned and deleted.
for a toy example:
def foo():
x = 1
del x
print(x)
foo()
Do the same for free variable.
def multiplier(n):
def multiply(x):
return x * n
del n
return multiply
The error message can be improved by adding "or got deleted". |
|
Date |
User |
Action |
Args |
2017-02-17 17:06:57 | mbussonn | set | recipients:
+ mbussonn |
2017-02-17 17:06:57 | mbussonn | set | messageid: <1487351217.08.0.939746599909.issue29593@psf.upfronthosting.co.za> |
2017-02-17 17:06:57 | mbussonn | link | issue29593 messages |
2017-02-17 17:06:56 | mbussonn | create | |
|