From dc8d029e96ae490d22f241a07c53229f7a552c15 Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Mon, 28 Nov 2022 14:05:48 +0100 Subject: [PATCH] ubuiltins: Document reversed. --- src/ubuiltins/__init__.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/ubuiltins/__init__.py b/src/ubuiltins/__init__.py index 1736fa7..a78a82f 100644 --- a/src/ubuiltins/__init__.py +++ b/src/ubuiltins/__init__.py @@ -648,6 +648,9 @@ def iter(object: Union[Iterable, Sequence]) -> Iterator: Arguments: object: Object for which to get the iterator. + + Returns: + The iterator. """ @@ -895,7 +898,16 @@ def repr(x: Any) -> _str: def reversed(seq: Sequence) -> Iterator: """ - Returns a reverse iterator. + reversed(seq) -> Iterator + + Gets an iterator that yields the values from the sequence in the reverse, if + supported. + + Arguments: + seq: Sequence from which to draw samples. + + Returns: + Iterator that yields values in reverse order, starting with the last value. """