py/objtype: type_attr: Fall back to lookup attr in "object".
Because mp_obj_class_lookup() doesn't do that by default, unless asked
explicitly (i.e. called with &mp_type_object as type to look up in).
This is similar to handling done in super_attr().
@@ -1098,6 +1098,9 @@ STATIC void type_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) {
.is_type = true,
};
mp_obj_class_lookup(&lookup, self);
+ if (dest[0] == MP_OBJ_NULL) {
+ mp_obj_class_lookup(&lookup, &mp_type_object);
+ }
} else {
// delete/store attribute
