fix: raises ValueError on conditional and operator
if lhs evaluates to false, rhs must be ignored, but rhs was evaluated then ValueError is occurred.
This commit is contained in:
parent
3a5d857a60
commit
7ee35a8510
2 changed files with 31 additions and 2 deletions
|
|
@ -941,8 +941,7 @@ class OpAnd(Op):
|
|||
|
||||
def expr(self, item):
|
||||
lhs = self.lhs.expr(item)
|
||||
rhs = self.rhs.expr(item)
|
||||
return lhs and rhs
|
||||
return lhs and self.rhs.expr(item)
|
||||
|
||||
|
||||
class OpLessThan(Op):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue