Two 3.4 fixes..

* LOAD_DEREF does not signal "nonlocal" variables
* Add rule for "if" with a "continue" and "return"
This commit is contained in:
rocky
2018-03-20 04:42:29 -04:00
parent 2e81ee5d2e
commit f008b8f411
4 changed files with 20 additions and 2 deletions

View File

@@ -13,8 +13,8 @@ else:
read_write_global_ops = frozenset(('STORE_GLOBAL', 'DELETE_GLOBAL', 'LOAD_GLOBAL'))
read_global_ops = frozenset(('STORE_GLOBAL', 'DELETE_GLOBAL'))
# NOTE: we also need to check that he variable name is a free variable, not a cell variable.
nonglobal_ops = frozenset(('LOAD_DEREF', 'STORE_DEREF', 'DELETE_DEREF'))
# NOTE: we also need to check that the variable name is a free variable, not a cell variable.
nonglobal_ops = frozenset(('STORE_DEREF', 'DELETE_DEREF'))
# FIXME: this and find_globals could be paramaterized with one of the
# above global ops