Closed xiaxinmeng closed 1 year ago
This works for me
$ cat > issue-200.py
class A:
def f(self):
nonlocal __x
$ gpython issue-200.py
2022/12/05 08:53:43 Can't compile "issue-200.py":
File "issue-200.py", line 3, offset 8
SyntaxError: "no binding for nonlocal '__x' found"
The following code take two underlines("_") and x as the name of a nonlocal variable x. gpython crashes with a segmentation fault.
Crashing Message: segmentation fault.
environment: gpython 0.1.0 on Ubuntu 18.04, and gpython main(https://github.com/go-python/gpython/commit/6f8e06a4660709ab44398d8b1a18738aa407b1c3 on Oct 5)