Skip to content

Commit 9069ac7

Browse files
committed
Add helpful example
1 parent c735a75 commit 9069ac7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Doc/library/functions.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1489,7 +1489,9 @@ are always available. They are listed here in alphabetical order.
14891489
returns ``100``, but ``pow(10, -2)`` returns ``0.01``. For a negative base of
14901490
type :class:`int` or :class:`float` and a non-integer exponent, a complex
14911491
result is delivered. For example, ``pow(-9, 0.5)`` returns a value close
1492-
to ``3j``.
1492+
to ``3j``. Whereas, for a negative base of type :class:`int` or :class:`float`
1493+
with an integral exponent, a real number is delivered. For example,
1494+
``pow(-9, 2.0)`` returns ``81.0``.
14931495

14941496
For :class:`int` operands *base* and *exp*, if *mod* is present, *mod* must
14951497
also be of integer type and *mod* must be nonzero. If *mod* is present and

0 commit comments

Comments
 (0)