From 94dfbbf7c106f39dd9858330dfe694eea615fc5a Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Mon, 28 Nov 2022 14:54:11 +0100 Subject: [PATCH] ubuiltins: Document pow. --- src/ubuiltins/__init__.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/ubuiltins/__init__.py b/src/ubuiltins/__init__.py index 45b53c3..28c7dd3 100644 --- a/src/ubuiltins/__init__.py +++ b/src/ubuiltins/__init__.py @@ -837,8 +837,19 @@ def ord(c: _str) -> _int: def pow(base: Union[_int, _float], exp: Union[_int, _float]) -> Union[_int, _float]: """ - Returns ``base`` to the power ``exp``. This is equivalent to using the - power operator: ``base ** exp``. + pow(base, exp) -> int + pow(base, exp) -> float + + Raises the base to the given exponent: :math:`\\text{base}^{\\mathrm{exp}}`. + + This is the same as doing ``base ** exp``. + + Arguments: + base (int or float): The base. + exp (int or float): The exponent. + + Returns: + The result. """