mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 01:24:17 +00:00
ubuiltins: Fix next.
MICROPY_PY_BUILTINS_NEXT2 is not enabled.
This commit is contained in:
@@ -746,21 +746,9 @@ def min(*args):
|
||||
"""
|
||||
|
||||
|
||||
@overload
|
||||
def next(iterator: Iterator) -> Any:
|
||||
...
|
||||
|
||||
|
||||
@overload
|
||||
def next(iterator: Iterator, default: Any) -> Any:
|
||||
...
|
||||
|
||||
|
||||
def next(*args):
|
||||
"""
|
||||
Retrieves the next item from the iterator by calling its ``__next__()`` method.
|
||||
If ``default`` is given, it is returned if the iterator is exhausted,
|
||||
otherwise ``StopIteration`` is raised.
|
||||
"""
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user