From a1b18b3ba7ccbf2c4d73608079844d89360688a3 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 20 Feb 2020 00:17:13 +1100 Subject: py: Removing dangling "else" to improve code format consistency. --- py/runtime.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'py/runtime.c') 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; -- cgit v1.2.3