Message308467
Can the peephole optimizer's fold_tuple_on_constants() be moved to ast_opt?
It looks to me like there is sufficient information in the tree:
import ast
print(ast.dump(ast.parse('c = (50+1, 60+2)')))
-----------------------------------------------
Module(body=[Assign(targets=[Name(id='c', ctx=Store())],
value=Tuple(elts=[BinOp(left=Num(n=50), op=Add(), right=Num(n=1)),
BinOp(left=Num(n=60), op=Add(), right=Num(n=2))], ctx=Load()))],
docstring=None)
''' |
|
Date |
User |
Action |
Args |
2017-12-16 09:04:10 | rhettinger | set | recipients:
+ rhettinger, vstinner, methane, serhiy.storchaka |
2017-12-16 09:04:09 | rhettinger | set | messageid: <1513415049.96.0.213398074469.issue32344@psf.upfronthosting.co.za> |
2017-12-16 09:04:09 | rhettinger | link | issue32344 messages |
2017-12-16 09:04:09 | rhettinger | create | |
|