IBM / pyflowgraph

Flow graphs for Python
Apache License 2.0
25 stars 8 forks source link

AST transformers for sequence literals #23

Closed epatters closed 5 years ago

epatters commented 5 years ago

Sequence literals, for lists, tuples, sets, and dictionaries, are currently not traced. Define an AST transformer to make them traceable, ala #16.

Tuples literals are perhaps the most important, not only because they appear often in their own right but because the AST transformer for extended indexing generates them, e.g.

x[:m,:n]

becomes

operator.getitem(x, (slice(m), slice(n)))