mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 09:50:15 +01:00
py: Change MP_UNARY_OP_INT to MP_UNARY_OP_INT_MAYBE.
To be consistent with MP_UNARY_OP_INT_FLOAT and MP_UNARY_OP_INT_COMPLEX, and allow int() to first check if a type supports __int__ before trying other things (as per CPython). Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -198,6 +198,7 @@ NORETURN void mp_raise_NotImplementedError(mp_rom_error_text_t msg);
|
||||
|
||||
NORETURN void mp_raise_type_arg(const mp_obj_type_t *exc_type, mp_obj_t arg);
|
||||
NORETURN void mp_raise_StopIteration(mp_obj_t arg);
|
||||
NORETURN void mp_raise_TypeError_int_conversion(mp_const_obj_t arg);
|
||||
NORETURN void mp_raise_OSError(int errno_);
|
||||
NORETURN void mp_raise_OSError_with_filename(int errno_, const char *filename);
|
||||
NORETURN void mp_raise_recursion_depth(void);
|
||||
|
||||
Reference in New Issue
Block a user