QUERY · ISSUE
RFC: MICROPY_PY_BUILTINS_NEXT2 always set to (0) ?
rfc
Current settings for all ports break cpython script compatibility on next()
https://docs.python.org/3.5/library/functions.html#next
because
MICROPY_PY_BUILTINS_NEXT2 is never defined to 1 except in coverage and defaults to 0
https://github.com/micropython/micropython/blob/master/py/mpconfig.h#L910
CANDIDATE · ISSUE
Built-in functon next() should be able to take a second optional argument.
Quoting https://docs.python.org/3.5/library/functions.html#next
next(iterator[, default])
Retrieve the next item from the iterator by calling its
__next__()method. If default is given, it is returned if the iterator is exhausted, otherwiseStopIterationis raised.