Skip to content

Commit 56e90cb

Browse files
committed
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 micropython#5384. Signed-off-by: Damien George <damien@micropython.org>
1 parent 4dfee50 commit 56e90cb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

py/mpconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1215,7 +1215,7 @@ typedef double mp_float_t;
12151215

12161216
// Support for calling next() with second argument
12171217
#ifndef MICROPY_PY_BUILTINS_NEXT2
1218-
#define MICROPY_PY_BUILTINS_NEXT2 (MICROPY_CONFIG_ROM_LEVEL_AT_LEAST_EVERYTHING)
1218+
#define MICROPY_PY_BUILTINS_NEXT2 (MICROPY_CONFIG_ROM_LEVEL_AT_LEAST_BASIC_FEATURES)
12191219
#endif
12201220

12211221
// Whether to support rounding of integers (incl bignum); eg round(123,-1)=120

0 commit comments

Comments
 (0)