Add "lazy lists" assignment support (mylist[index] = value).
Add support for LAMBDA (empty) tree nodes while on it, that allow us to define private stuff at the top without caring about Loc.
This commit is contained in:
@@ -1015,9 +1015,10 @@ class foldconst(object):
|
||||
node['SEF'] = True
|
||||
return
|
||||
|
||||
if nt in ('JUMP', '@', 'V++', 'V--', '--V', '++V'):
|
||||
# These all have side effects, as in, can't be eliminated as
|
||||
# statements.
|
||||
if nt in ('JUMP', '@', 'V++', 'V--', '--V', '++V', 'LAMBDA'):
|
||||
# Except LAMBDA, these all have side effects, as in, can't be
|
||||
# eliminated as statements.
|
||||
# LAMBDA can't be eliminated without scrolling Loc's.
|
||||
return
|
||||
|
||||
assert False, 'Internal error: This should not happen, node type = ' \
|
||||
|
||||
Reference in New Issue
Block a user