From 4bc53b17f4f71af1ae24c2ab16f96b22d8c762ff Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Mon, 28 Nov 2022 11:11:15 +0100 Subject: [PATCH] ubuiltins: Document len(). --- src/ubuiltins/__init__.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/ubuiltins/__init__.py b/src/ubuiltins/__init__.py index 7bf8059..d2e6a1f 100644 --- a/src/ubuiltins/__init__.py +++ b/src/ubuiltins/__init__.py @@ -15,6 +15,8 @@ """ The following functions and exceptions can be used without importing anything. + +Most functions and classes in this module do not accept keyword arguments. """ from typing import ( @@ -644,7 +646,15 @@ def iter(object: Union[Iterable, Sequence]) -> Iterator: def len(s: Sequence) -> _int: """ - Returns the length (the number of items) of an object. + len(s) -> int + + Gets the length (the number of items) of an object. + + Arguments: + s (Sequence): The sequence of which to get the length. + + Returns: + The length. """