jimbaker / fl-string-pep

PEP to add fl-string support to Python 3.10
0 stars 0 forks source link

Example: Rewriting expression graphs #8

Open jimbaker opened 4 years ago

jimbaker commented 4 years ago

Given something like the following using quotes

x{1 <= x < 10}

rewrite as

x[(1 <= x) & (x < 10)]

Such rewriting should be fully recursive and take in account scope (of course). Short-circuit evaluation should be supported as well.

It might be nice to use the pattern matching work!