Comparison chaining evaluates values several times #261
Labels
bb: medium
Medium issue according to bug bounty categorization
bug bounty
This issue is prized out as part of the Bug Bounty Program
bug
Something isn't working
Currently comparison chaining is internally just rewritten such that
x < y < z
becomesx < y and y < z
. In the case wherey
is not a constant, this actually breaks the semantics of python which state that the inner value should only be computed once. It does not matter here, since the only side effect is tracing - but should still be fixed also for reducing computation costThe text was updated successfully, but these errors were encountered: