From cd2e53f70baeebe2b7e671f3b8dba53c743217dc Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Mon, 28 Nov 2022 14:41:29 +0100 Subject: [PATCH] ubuiltins: Document max, min. --- src/ubuiltins/__init__.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/ubuiltins/__init__.py b/src/ubuiltins/__init__.py index 7608384..9cd82fe 100644 --- a/src/ubuiltins/__init__.py +++ b/src/ubuiltins/__init__.py @@ -745,7 +745,15 @@ def max(arg1: Any, arg2: Any, *args: Any) -> Any: def max(*args): """ - Returns the largest item in an iterable or the largest of two or more arguments. + max(iterable) -> Any + max(arg1, arg2, ....) -> Any + + Gets the object with largest value. + + The argument may be a single iterable, or any number of objects. + + Returns: + The object with the largest value. """ @@ -761,7 +769,15 @@ def min(arg1: Any, arg2: Any, *args: Any) -> Any: def min(*args): """ - Returns the smallest item in an iterable or the smallest of two or more arguments. + min(iterable) -> Any + min(arg1, arg2, ....) -> Any + + Gets the object with smallest value. + + The argument may be a single iterable, or any number of objects. + + Returns: + The object with the smallest value. """