Matthias Bussonnier <bussonniermatth...@gmail.com> added the comment:
> A utility to check whether an AST requires async mode should be fairly > straightforward. Here is one case we forgot in IPython apparently : In [1]: x = 1 ...: def f(): ...: nonlocal x ...: x = 10000 This is not detected as a syntax error, but considered as asyn, we took an approach that prefer false positive (try to run invalid syntax as async) than false negative (reject valid async-code). Add this to the test suite for this feature. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34616> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com