poochon
poochon

Reputation: 35

PyEDA - replace node in expression

Consider the following piece of PyEDA:

a, b, c = map(exprvar, 'abc')
f1 = And(a,Or(~a,b))
print(f1)

outputs:

And(a, Or(~a, b))

How can I replace the first a with c? compose replaces all instances of a:

f1.compose({a: c})

outputs:

And(c, Or(~c, b))

Upvotes: 1

Views: 89

Answers (0)

Related Questions