Skip to content

Commit

Permalink
ubuiltins: Document pow.
Browse files Browse the repository at this point in the history
  • Loading branch information
laurensvalk committed Nov 28, 2022
1 parent 88b2502 commit 94dfbbf
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/ubuiltins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""


Expand Down

0 comments on commit 94dfbbf

Please sign in to comment.