summaryrefslogtreecommitdiff
path: root/py/runtime.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/runtime.c')
-rw-r--r--py/runtime.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/py/runtime.c b/py/runtime.c
index a3628eecb..e50256605 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -1049,14 +1049,13 @@ void mp_load_method_maybe(mp_obj_t obj, qstr attr, mp_obj_t *dest) {
mp_obj_type_t *type = mp_obj_get_type(obj);
// look for built-in names
- if (0) {
#if MICROPY_CPYTHON_COMPAT
- } else if (attr == MP_QSTR___class__) {
+ if (attr == MP_QSTR___class__) {
// a.__class__ is equivalent to type(a)
dest[0] = MP_OBJ_FROM_PTR(type);
+ } else
#endif
-
- } else if (attr == MP_QSTR___next__ && type->iternext != NULL) {
+ if (attr == MP_QSTR___next__ && type->iternext != NULL) {
dest[0] = MP_OBJ_FROM_PTR(&mp_builtin_next_obj);
dest[1] = obj;