summaryrefslogtreecommitdiff
path: root/py/runtime.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2020-02-20 00:17:13 +1100
committerDamien George <damien.p.george@gmail.com>2020-02-28 10:29:27 +1100
commita1b18b3ba7ccbf2c4d73608079844d89360688a3 (patch)
tree00ffb10d1bbe77227350e7019759c5a67917a1e7 /py/runtime.c
parent4b23e98fb0851eb74ec269022a1e86702e387b23 (diff)
py: Removing dangling "else" to improve code format consistency.
Diffstat (limited to 'py/runtime.c')
-rw-r--r--py/runtime.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/py/runtime.c b/py/runtime.c
index 3926f89ce..9b5527d72 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -1056,12 +1056,14 @@ void mp_load_method_maybe(mp_obj_t obj, qstr attr, mp_obj_t *dest) {
const mp_obj_type_t *type = mp_obj_get_type(obj);
// look for built-in names
-#if MICROPY_CPYTHON_COMPAT
+ #if MICROPY_CPYTHON_COMPAT
if (attr == MP_QSTR___class__) {
// a.__class__ is equivalent to type(a)
dest[0] = MP_OBJ_FROM_PTR(type);
- } else
-#endif
+ return;
+ }
+ #endif
+
if (attr == MP_QSTR___next__ && type->iternext != NULL) {
dest[0] = MP_OBJ_FROM_PTR(&mp_builtin_next_obj);
dest[1] = obj;