You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
309 B
12 lines
309 B
"""
|
|
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))
|
|
|