summaryrefslogtreecommitdiff
path: root/py/obj.h
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-08-30 01:35:48 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-08-30 01:39:24 +0300
commit784909ce1655bf8b2a97ac81a3842e844992082f (patch)
tree8567b5d4771b43288bfc81940b833cc193661e8a /py/obj.h
parent8388ec4e35142539fb09d2a9ef5981b5732a349f (diff)
py/objtype: Handle NotImplemented return from binary special methods.
NotImplemented means "try other fallbacks (like calling __rop__ instead of __op__) and if nothing works, raise TypeError". As MicroPython doesn't implement any fallbacks, signal to raise TypeError right away.
Diffstat (limited to 'py/obj.h')
-rw-r--r--py/obj.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/obj.h b/py/obj.h
index 2adcab1a6..323423b3e 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -616,6 +616,7 @@ extern const mp_obj_type_t mp_type_ZeroDivisionError;
#define mp_const_true (MP_OBJ_FROM_PTR(&mp_const_true_obj))
#define mp_const_empty_bytes (MP_OBJ_FROM_PTR(&mp_const_empty_bytes_obj))
#define mp_const_empty_tuple (MP_OBJ_FROM_PTR(&mp_const_empty_tuple_obj))
+#define mp_const_notimplemented (MP_OBJ_FROM_PTR(&mp_const_notimplemented_obj))
extern const struct _mp_obj_none_t mp_const_none_obj;
extern const struct _mp_obj_bool_t mp_const_false_obj;
extern const struct _mp_obj_bool_t mp_const_true_obj;