mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 09:50:15 +01:00
14 lines
310 B
Python
14 lines
310 B
Python
"""
|
|
categories: Modules,builtins
|
|
description: Second argument to next() is not implemented
|
|
cause: MicroPython is optimised for code space.
|
|
workaround: Instead of ``val = next(it, deflt)`` use::
|
|
|
|
try:
|
|
val = next(it)
|
|
except StopIteration:
|
|
val = deflt
|
|
"""
|
|
|
|
print(next(iter(range(0)), 42))
|