Commit abd87d35 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Minor compareInternal optimization

parent c44e4dab
......@@ -3695,7 +3695,11 @@ Box* compareInternal(Box* lhs, Box* rhs, int op_type, CompareRewriteArgs* rewrit
return boxBool(result);
}
bool b = nonzero(contained);
bool b;
if (contained->cls == bool_cls)
b = contained == True;
else
b = contained->nonzeroIC();
if (op_type == AST_TYPE::NotIn)
return boxBool(!b);
return boxBool(b);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment