8000 objtype: super: Add stop condition for looking up in base types. · errordeveloper/micropython@6a41078 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit 6a41078

Browse files
committed
objtype: super: Add stop condition for looking up in base types.
1 parent aa7cf6f commit 6a41078

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

py/objtype.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,9 @@ STATIC void super_load_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) {
735735
for (uint i = 0; i < len; i++) {
736736
assert(MP_OBJ_IS_TYPE(items[i], &mp_type_type));
737737
mp_obj_class_lookup(self->obj, (mp_obj_type_t*)items[i], attr, 0, dest);
738+
if (dest[0] != MP_OBJ_NULL) {
739+
return;
740+
}
738741
}
739742
}
740743

0 commit comments

Comments
 (0)
0