https://github.com/python/cpython/commit/501cd99c8e54e70fad80fb3b201647b3d0860b09 commit: 501cd99c8e54e70fad80fb3b201647b3d0860b09 branch: 3.12 author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com> committer: erlend-aasland <erlend.aasl...@protonmail.com> date: 2024-06-07T09:53:55Z summary:
[3.12] gh-110383: Clarify "non-integral" wording in pow() docs (GH-119688) (#120207) (cherry picked from commit 6646a9da26d12fc54263b22dd2916a2f710f1db7) Co-authored-by: Aditya Borikar <adityaborik...@gmail.com> files: M Doc/library/functions.rst diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 6901c021d7bd6e..f7fda9dcba413e 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1496,7 +1496,9 @@ are always available. They are listed here in alphabetical order. returns ``100``, but ``pow(10, -2)`` returns ``0.01``. For a negative base of type :class:`int` or :class:`float` and a non-integral exponent, a complex result is delivered. For example, ``pow(-9, 0.5)`` returns a value close - to ``3j``. + to ``3j``. Whereas, for a negative base of type :class:`int` or :class:`float` + with an integral exponent, a float result is delivered. For example, + ``pow(-9, 2.0)`` returns ``81.0``. For :class:`int` operands *base* and *exp*, if *mod* is present, *mod* must also be of integer type and *mod* must be nonzero. If *mod* is present and _______________________________________________ Python-checkins mailing list -- python-checkins@python.org To unsubscribe send an email to python-checkins-le...@python.org https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: arch...@mail-archive.com