From 17c45c32456daa2817165d2d29aab2763ca86ea6 Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Mon, 28 Nov 2022 15:30:55 +0100 Subject: [PATCH] ubuiltins: Document hash. --- src/ubuiltins/__init__.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ubuiltins/__init__.py b/src/ubuiltins/__init__.py index e2f0487..41b26b5 100644 --- a/src/ubuiltins/__init__.py +++ b/src/ubuiltins/__init__.py @@ -541,7 +541,15 @@ def hasattr(object: Any, name: _str) -> _bool: def hash(object: Any) -> _int: """ - Returns the hash value of the object (if it has one). + hash(object) -> int + + Gets the hash value of an object, if the object supports it. + + Arguments: + object: Object for which to get a hash value. + + Returns: + The hash value. """