Annotated name can't be global on PyPy
On Pypy, the annotated name can't be set as global, while it can work normally on CPython.
test.py
def set_name():
global name
name = 2
name:int = 0
The behaviors on CPython 3.8.0,3.9.0: work normally
The behaviors on Pypy 3.9:
File "/home/xxm/Desktop/pypy/test.py", line 272
name:int = 0
^
SyntaxError: annotated name 'name' can't be global
Reproduce step:
- download the binaries from https://www.pypy.org/download.html
- 'pypy3.9-v7.3.11-linux64/bin/pypy3.9' test.py
Environment: Ubuntu 18.04; PyPy:pypy3.9-v7.3.11-linux64; CPython: 3.8.0,3.9.0