diff --git a/py/objtype.c b/py/objtype.c
index 46e892a1214d144cbde6e0ceb97c2a616897fd4b..53408a07edbcd27cc51a5cd6994cf7dd1d445f11 100644
--- a/py/objtype.c
+++ b/py/objtype.c
@@ -323,7 +323,7 @@ mp_obj_t instance_make_new(mp_obj_t self_in, mp_uint_t n_args, mp_uint_t n_kw, c
     return o;
 }
 
-STATIC const qstr unary_op_method_name[] = {
+const qstr mp_unary_op_method_name[] = {
     [MP_UNARY_OP_BOOL] = MP_QSTR___bool__,
     [MP_UNARY_OP_LEN] = MP_QSTR___len__,
     //[MP_UNARY_OP_POSITIVE,
@@ -334,7 +334,7 @@ STATIC const qstr unary_op_method_name[] = {
 
 STATIC mp_obj_t instance_unary_op(mp_uint_t op, mp_obj_t self_in) {
     mp_obj_instance_t *self = self_in;
-    qstr op_name = unary_op_method_name[op];
+    qstr op_name = mp_unary_op_method_name[op];
     /* Still try to lookup native slot
     if (op_name == 0) {
         return MP_OBJ_NULL;
diff --git a/py/runtime.c b/py/runtime.c
index 3597f56546c3c13fa71c542a60612d8b8cdaf11d..fc8d128e77bd76a2cafedd3a00a6d64964cc8c95 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -242,10 +242,9 @@ mp_obj_t mp_unary_op(mp_uint_t op, mp_obj_t arg) {
             nlr_raise(mp_obj_new_exception_msg(&mp_type_TypeError,
                 "unsupported type for operator"));
         } else {
-            // TODO specify in error message what the operator is
             nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_TypeError,
-                "bad operand type for unary operator: '%s'",
-                mp_obj_get_type_str(arg)));
+                "unsupported type for %s: '%s'",
+                qstr_str(mp_unary_op_method_name[op]), mp_obj_get_type_str(arg)));
         }
     }
 }
@@ -537,10 +536,9 @@ unsupported_op:
         nlr_raise(mp_obj_new_exception_msg(&mp_type_TypeError,
             "unsupported type for operator"));
     } else {
-        // TODO specify in error message what the operator is
         nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_TypeError,
-            "unsupported operand types for binary operator: '%s', '%s'",
-            mp_obj_get_type_str(lhs), mp_obj_get_type_str(rhs)));
+            "unsupported types for %s: '%s', '%s'",
+            qstr_str(mp_binary_op_method_name[op]), mp_obj_get_type_str(lhs), mp_obj_get_type_str(rhs)));
     }
 
 zero_division:
diff --git a/py/runtime.h b/py/runtime.h
index 1216462b2547bbcbb468757fbb0f744ec391b19f..a4386b4bb6e31d7dd463d481fe115f22d7b0d9d9 100644
--- a/py/runtime.h
+++ b/py/runtime.h
@@ -56,6 +56,10 @@ typedef struct _mp_arg_t {
     mp_arg_val_t defval;
 } mp_arg_t;
 
+// defined in objtype.c
+extern const qstr mp_unary_op_method_name[];
+extern const qstr mp_binary_op_method_name[];
+
 void mp_init(void);
 void mp_deinit(void);
 
diff --git a/py/showbc.c b/py/showbc.c
index abff93aec257b31a7f5aae3f3aff5fd8e10709c2..1bdb96aaa82ea8e0fbb50818b6e229980c310627 100644
--- a/py/showbc.c
+++ b/py/showbc.c
@@ -30,8 +30,6 @@
 #include "py/bc0.h"
 #include "py/bc.h"
 
-extern const qstr mp_binary_op_method_name[];
-
 #if MICROPY_DEBUG_PRINTERS
 
 #define DECODE_UINT { \