We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnboundLocalError
The interpreter currently doesn't check if a variable is being read before being assigned to in a scope.
It leads to bugs like this:
x = 10 def f(): x = x + 1 # accidentally reading the variable from global, but writing in local print(x) f() print(x)
$ interpreted asd.py 11 10
This should throw UnboundLocalError instead.
The text was updated successfully, but these errors were encountered:
yess
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
The interpreter currently doesn't check if a variable is being read before being assigned to in a scope.
It leads to bugs like this:
This should throw
UnboundLocalError
instead.The text was updated successfully, but these errors were encountered: