From 56e90cb60b028f0a306e6253ad183e6cd4a2b45e Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 11 Mar 2025 13:14:46 +1100 Subject: [PATCH] py/mpconfig: Enable 2-argument built-in next() at basic feature level. This is a pretty fundamental built-in and having CPython-compatible behaviour is beneficial. The code size increase is not much, and ports/boards can still disable it if needed to save space. Addresses issue #5384. Signed-off-by: Damien George --- py/mpconfig.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/mpconfig.h b/py/mpconfig.h index 05f39b360..dfa32ebf7 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -1215,7 +1215,7 @@ typedef double mp_float_t; // Support for calling next() with second argument #ifndef MICROPY_PY_BUILTINS_NEXT2 -#define MICROPY_PY_BUILTINS_NEXT2 (MICROPY_CONFIG_ROM_LEVEL_AT_LEAST_EVERYTHING) +#define MICROPY_PY_BUILTINS_NEXT2 (MICROPY_CONFIG_ROM_LEVEL_AT_LEAST_BASIC_FEATURES) #endif // Whether to support rounding of integers (incl bignum); eg round(123,-1)=120