Skip to content

Commit 20fd185

Browse files
Simplify code
Co-authored-by: Brandt Bucher <[email protected]>
1 parent ce0cd38 commit 20fd185

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/optimizer_bytecodes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ dummy_func(void) {
901901
// known types, meaning we can deduce either True or False
902902

903903
// The below check is equivalent to PyObject_TypeCheck(inst, cls)
904-
if (sym_matches_type(instance, cls_o) || PyType_IsSubtype(inst_type, cls_o)) {
904+
if (inst_type == cls_o || PyType_IsSubtype(inst_type, cls_o)) {
905905
sym_set_const(res, Py_True);
906906
}
907907
else {

0 commit comments

Comments
 (0)