File tree 1 file changed +6
-7
lines changed 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -136,20 +136,19 @@ STATIC void mp_help
8000
_print_obj(const mp_obj_t obj) {
136
136
}
137
137
#endif
138
138
139
+ mp_obj_type_t * type = mp_obj_get_type (obj );
140
+
139
141
// try to print something sensible about the given object
140
142
mp_print_str (MP_PYTHON_PRINTER , "object " );
141
143
mp_obj_print (obj , PRINT_STR );
142
- mp_printf (MP_PYTHON_PRINTER , " is of type %s \n" , mp_obj_get_type_str ( obj ) );
144
+ mp_printf (MP_PYTHON_PRINTER , " is of type %q \n" , type -> name );
143
145
144
146
mp_map_t * map = NULL ;
145
- if (MP_OBJ_IS_TYPE ( obj , & mp_type_module ) ) {
147
+ if (type == & mp_type_module ) {
146
148
map = mp_obj_dict_get_map (mp_obj_module_get_globals (obj ));
147
149
} else {
148
- mp_obj_type_t * type ;
149
- if (MP_OBJ_IS_TYPE (obj , & mp_type_type )) {
150
- type = obj ;
151
- } else {
152
- type = mp_obj_get_type (obj );
150
+ if (type == & mp_type_type ) {
151
<
4C6D
td data-grid-cell-id="diff-c81891eaf428ec5c32ee8b380bfe89f5a86c08d8008202c090fd9731ee1c32c7-152-151-2" data-line-anchor="diff-c81891eaf428ec5c32ee8b380bfe89f5a86c08d8008202c090fd9731ee1c32c7R151" data-selected="false" role="gridcell" style="background-color:var(--diffBlob-additionLine-bgColor, var(--diffBlob-addition-bgColor-line));padding-right:24px" tabindex="-1" valign="top" class="focusable-grid-cell diff-text-cell right-side-diff-cell left-side">+ type = MP_OBJ_TO_PTR (obj );
153
152
}
154
153
if (type -> locals_dict != MP_OBJ_NULL && MP_OBJ_IS_TYPE (type -> locals_dict , & mp_type_dict )) {
155
154
map = mp_obj_dict_get_map (type -> locals_dict );
You can’t perform that action at this time.
0 commit comments