2017-11-27 18:50:53 -05:00
|
|
|
"""
|
|
|
|
categories: Modules,builtins
|
|
|
|
description: Second argument to next() is not implemented
|
|
|
|
cause: MicroPython is optimised for code space.
|
2017-12-03 08:32:09 -05:00
|
|
|
workaround: Instead of ``val = next(it, deflt)`` use::
|
2017-11-27 18:50:53 -05:00
|
|
|
|
|
|
|
try:
|
|
|
|
val = next(it)
|
|
|
|
except StopIteration:
|
|
|
|
val = deflt
|
|
|
|
"""
|
|
|
|
print(next(iter(range(0)), 42))
|