global/local syntax errors not caught

Bug #1590549 reported by asmeurer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pyflakes
New
Undecided
Unassigned

Bug Description

This is perhaps a bit obscure, but here's a class of syntax errors that aren't caught by pyflakes

$ cat test.py
def test(x):
    global x
$ pyflakes test.py
$ python test.py
  File "test.py", line 2
    global x
SyntaxError: name 'x' is parameter and global

I'm unsure what the full set of possible errors are here. One would need to check the Python source. I know there are some others relating to the Python 3 "nonlocal" keyword as well.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.