From ddcdc6f745a724e652f7f0a62a87c2302c685e3e Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Mon, 28 Nov 2022 13:50:36 +0100 Subject: [PATCH] ubuiltins: Document next. --- src/ubuiltins/__init__.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/ubuiltins/__init__.py b/src/ubuiltins/__init__.py index b3362a4..85796e2 100644 --- a/src/ubuiltins/__init__.py +++ b/src/ubuiltins/__init__.py @@ -711,6 +711,9 @@ def map(function: Callable, iterable: Iterable, *args: Any) -> Iterator: iterable (iter): One or more source interables from which to draw data. With multiple iterables, the iterator stops when the shortest iterable is exhausted. + + Returns: + The new, mapped iterator. """ @@ -748,7 +751,16 @@ def min(*args): def next(iterator: Iterator) -> Any: """ + next(iterator) -> Any + Retrieves the next item from the iterator by calling its ``__next__()`` method. + + Arguments: + iterator (iter): Initialized generator object from which to draw the next + value. + + Returns: + The next value from the generator. """