Menu

#294 Support nonlocal statement

0.8.18
open
nobody
None
5
2011-05-08
2011-05-08
No

On the following source code:

#!/usr/bin/python3

def foo():
i = 1
def bar():
nonlocal i
return i + 1
return bar

print(foo()())

pychecker gives the following error:

Processing module pychecker (pychecker.py)...
SyntaxError: invalid syntax (pychecker.py, line 6)
nonlocal i
^

pychecker should support the nonlocal statement, which is new in Python 3

Discussion


Log in to post a comment.