QuantStack / py2vega

BSD 3-Clause "New" or "Revised" License
9 stars 4 forks source link

Assignment #33

Open martinRenou opened 5 years ago

martinRenou commented 5 years ago

We should use beniget for assignments and forward substitution. By using beniget we could allow this kind of functions:

def foo(value):
    if value < 3:
        b = 3
    else:
        b = 4
    return b

This should turn into an equivalent of value < 3 ? 3 : 4