1 parent bc5b3f8 commit c3e72a8Copy full SHA for c3e72a8
2 files changed
py/obj.c
@@ -66,7 +66,7 @@ void mp_obj_print_exception(mp_obj_t exc) {
66
}
67
68
bool mp_obj_is_callable(mp_obj_t o_in) {
69
- if (MP_OBJ_IS_SMALL_INT(o_in)) {
+ if (!MP_OBJ_IS_OBJ(o_in)) {
70
return false;
71
} else {
72
mp_obj_base_t *o = o_in;
tests/basics/builtin-callable.py
@@ -0,0 +1,5 @@
1
+import sys
2
+print(callable(1))
3
+print(callable("dfsd"))
4
+print(callable(callable))
5
+print(callable(sys))
0 commit comments