@@ -359,7 +359,7 @@ mp_float_t mp_obj_get_float(mp_obj_t arg) {
359359 mp_float_t val ;
360360
361361 if (!mp_obj_get_float_maybe (arg , & val )) {
362- #if MICROPY_ERROR_REPORTING = = MICROPY_ERROR_REPORTING_TERSE
362+ #if MICROPY_ERROR_REPORTING < = MICROPY_ERROR_REPORTING_TERSE
363363 mp_raise_TypeError (MP_ERROR_TEXT ("can't convert to float" ));
364364 #else
365365 mp_raise_msg_varg (& mp_type_TypeError ,
@@ -399,7 +399,7 @@ bool mp_obj_get_complex_maybe(mp_obj_t arg, mp_float_t *real, mp_float_t *imag)
399399
400400void mp_obj_get_complex (mp_obj_t arg , mp_float_t * real , mp_float_t * imag ) {
401401 if (!mp_obj_get_complex_maybe (arg , real , imag )) {
402- #if MICROPY_ERROR_REPORTING = = MICROPY_ERROR_REPORTING_TERSE
402+ #if MICROPY_ERROR_REPORTING < = MICROPY_ERROR_REPORTING_TERSE
403403 mp_raise_TypeError (MP_ERROR_TEXT ("can't convert to complex" ));
404404 #else
405405 mp_raise_msg_varg (& mp_type_TypeError ,
@@ -417,7 +417,7 @@ void mp_obj_get_array(mp_obj_t o, size_t *len, mp_obj_t **items) {
417417 } else if (mp_obj_is_type (o , & mp_type_list )) {
418418 mp_obj_list_get (o , len , items );
419419 } else {
420- #if MICROPY_ERROR_REPORTING = = MICROPY_ERROR_REPORTING_TERSE
420+ #if MICROPY_ERROR_REPORTING < = MICROPY_ERROR_REPORTING_TERSE
421421 mp_raise_TypeError (MP_ERROR_TEXT ("expected tuple/list" ));
422422 #else
423423 mp_raise_msg_varg (& mp_type_TypeError ,
@@ -431,7 +431,7 @@ void mp_obj_get_array_fixed_n(mp_obj_t o, size_t len, mp_obj_t **items) {
431431 size_t seq_len ;
432432 mp_obj_get_array (o , & seq_len , items );
433433 if (seq_len != len ) {
434- #if MICROPY_ERROR_REPORTING = = MICROPY_ERROR_REPORTING_TERSE
434+ #if MICROPY_ERROR_REPORTING < = MICROPY_ERROR_REPORTING_TERSE
435435 mp_raise_ValueError (MP_ERROR_TEXT ("tuple/list has wrong length" ));
436436 #else
437437 mp_raise_msg_varg (& mp_type_ValueError ,
@@ -446,7 +446,7 @@ size_t mp_get_index(const mp_obj_type_t *type, size_t len, mp_obj_t index, bool
446446 if (mp_obj_is_small_int (index )) {
447447 i = MP_OBJ_SMALL_INT_VALUE (index );
448448 } else if (!mp_obj_get_int_maybe (index , & i )) {
449- #if MICROPY_ERROR_REPORTING = = MICROPY_ERROR_REPORTING_TERSE
449+ #if MICROPY_ERROR_REPORTING < = MICROPY_ERROR_REPORTING_TERSE
450450 mp_raise_TypeError (MP_ERROR_TEXT ("indices must be integers" ));
451451 #else
452452 mp_raise_msg_varg (& mp_type_TypeError ,
@@ -466,7 +466,7 @@ size_t mp_get_index(const mp_obj_type_t *type, size_t len, mp_obj_t index, bool
466466 }
467467 } else {
468468 if (i < 0 || (mp_uint_t )i >= len ) {
469- #if MICROPY_ERROR_REPORTING = = MICROPY_ERROR_REPORTING_TERSE
469+ #if MICROPY_ERROR_REPORTING < = MICROPY_ERROR_REPORTING_TERSE
470470 mp_raise_msg (& mp_type_IndexError , MP_ERROR_TEXT ("index out of range" ));
471471 #else
472472 mp_raise_msg_varg (& mp_type_IndexError , MP_ERROR_TEXT ("%q index out of range" ), type -> name );
@@ -500,7 +500,7 @@ mp_obj_t mp_obj_id(mp_obj_t o_in) {
500500mp_obj_t mp_obj_len (mp_obj_t o_in ) {
501501 mp_obj_t len = mp_obj_len_maybe (o_in );
502502 if (len == MP_OBJ_NULL ) {
503- #if MICROPY_ERROR_REPORTING = = MICROPY_ERROR_REPORTING_TERSE
503+ #if MICROPY_ERROR_REPORTING < = MICROPY_ERROR_REPORTING_TERSE
504504 mp_raise_TypeError (MP_ERROR_TEXT ("object has no len" ));
505505 #else
506506 mp_raise_msg_varg (& mp_type_TypeError ,
@@ -541,21 +541,21 @@ mp_obj_t mp_obj_subscr(mp_obj_t base, mp_obj_t index, mp_obj_t value) {
541541 // TODO: call base classes here?
542542 }
543543 if (value == MP_OBJ_NULL ) {
544- #if MICROPY_ERROR_REPORTING = = MICROPY_ERROR_REPORTING_TERSE
544+ #if MICROPY_ERROR_REPORTING < = MICROPY_ERROR_REPORTING_TERSE
545545 mp_raise_TypeError (MP_ERROR_TEXT ("object doesn't support item deletion" ));
546546 #else
547547 mp_raise_msg_varg (& mp_type_TypeError ,
548548 MP_ERROR_TEXT ("'%s' object doesn't support item deletion" ), mp_obj_get_type_str (base ));
549549 #endif
550550 } else if (value == MP_OBJ_SENTINEL ) {
551- #if MICROPY_ERROR_REPORTING = = MICROPY_ERROR_REPORTING_TERSE
551+ #if MICROPY_ERROR_REPORTING < = MICROPY_ERROR_REPORTING_TERSE
552552 mp_raise_TypeError (MP_ERROR_TEXT ("object isn't subscriptable" ));
553553 #else
554554 mp_raise_msg_varg (& mp_type_TypeError ,
555555 MP_ERROR_TEXT ("'%s' object isn't subscriptable" ), mp_obj_get_type_str (base ));
556556 #endif
557557 } else {
558- #if MICROPY_ERROR_REPORTING = = MICROPY_ERROR_REPORTING_TERSE
558+ #if MICROPY_ERROR_REPORTING < = MICROPY_ERROR_REPORTING_TERSE
559559 mp_raise_TypeError (MP_ERROR_TEXT ("object doesn't support item assignment" ));
560560 #else
561561 mp_raise_msg_varg (& mp_type_TypeError ,
0 commit comments