The context hint can be used to perform an static optimization based on the context given.
(node, environment)
| 21 | |
| 22 | |
| 23 | def optimize(node, environment): |
| 24 | """The context hint can be used to perform an static optimization |
| 25 | based on the context given.""" |
| 26 | optimizer = Optimizer(environment) |
| 27 | return optimizer.visit(node) |
| 28 | |
| 29 | |
| 30 | class Optimizer(NodeTransformer): |