Fix bug around implicit calls to __nonzero__
For those calls (such as in conditionals and "not x" expressions), if for some reason we didn't think the object could be converted to bool, we would crash in codegen. This could happen if we knew that the type was a builtin type (ex: None, or dict) and we hadn't yet implemented __nonzero__. Unrelated, but implement isinstance(obj, (tuple_of_classes,)). This also lets us use multiple exception types in a single except statement.
Showing
test/tests/bool_functions.py
0 → 100644
test/tests/optparse_test.py
0 → 100644
Please register or sign in to comment