[3.10] [docs] Improve the markup of powers (GH-28598) (GH-28607)
(cherry picked from commit 4f05f15d7b25ef8b690cb94fdc4c8cb5521a4e27)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index e89323f..f4c3ef4 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -1356,8 +1356,8 @@
coercion rules for binary arithmetic operators apply. For :class:`int`
operands, the result has the same type as the operands (after coercion)
unless the second argument is negative; in that case, all arguments are
- converted to float and a float result is delivered. For example, ``10**2``
- returns ``100``, but ``10**-2`` returns ``0.01``.
+ converted to float and a float result is delivered. For example, ``pow(10, 2)``
+ returns ``100``, but ``pow(10, -2)`` returns ``0.01``.
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
diff --git a/Doc/library/hashlib.rst b/Doc/library/hashlib.rst
index 37addee..77b35fd 100644
--- a/Doc/library/hashlib.rst
+++ b/Doc/library/hashlib.rst
@@ -376,10 +376,10 @@
* *depth*: maximal depth of tree (1 to 255, 255 if unlimited, 1 in
sequential mode).
-* *leaf_size*: maximal byte length of leaf (0 to 2**32-1, 0 if unlimited or in
+* *leaf_size*: maximal byte length of leaf (0 to ``2**32-1``, 0 if unlimited or in
sequential mode).
-* *node_offset*: node offset (0 to 2**64-1 for BLAKE2b, 0 to 2**48-1 for
+* *node_offset*: node offset (0 to ``2**64-1`` for BLAKE2b, 0 to ``2**48-1`` for
BLAKE2s, 0 for the first, leftmost, leaf, or in sequential mode).
* *node_depth*: node depth (0 to 255, 0 for leaves, or in sequential mode).
diff --git a/Doc/library/ipaddress.rst b/Doc/library/ipaddress.rst
index 2ab4dd8..74d922d 100644
--- a/Doc/library/ipaddress.rst
+++ b/Doc/library/ipaddress.rst
@@ -41,7 +41,7 @@
Return an :class:`IPv4Address` or :class:`IPv6Address` object depending on
the IP address passed as argument. Either IPv4 or IPv6 addresses may be
- supplied; integers less than 2**32 will be considered to be IPv4 by default.
+ supplied; integers less than ``2**32`` will be considered to be IPv4 by default.
A :exc:`ValueError` is raised if *address* does not represent a valid IPv4
or IPv6 address.
@@ -56,7 +56,7 @@
Return an :class:`IPv4Network` or :class:`IPv6Network` object depending on
the IP address passed as argument. *address* is a string or integer
representing the IP network. Either IPv4 or IPv6 networks may be supplied;
- integers less than 2**32 will be considered to be IPv4 by default. *strict*
+ integers less than ``2**32`` will be considered to be IPv4 by default. *strict*
is passed to :class:`IPv4Network` or :class:`IPv6Network` constructor. A
:exc:`ValueError` is raised if *address* does not represent a valid IPv4 or
IPv6 address, or if the network has host bits set.
@@ -70,7 +70,7 @@
Return an :class:`IPv4Interface` or :class:`IPv6Interface` object depending
on the IP address passed as argument. *address* is a string or integer
representing the IP address. Either IPv4 or IPv6 addresses may be supplied;
- integers less than 2**32 will be considered to be IPv4 by default. A
+ integers less than ``2**32`` will be considered to be IPv4 by default. A
:exc:`ValueError` is raised if *address* does not represent a valid IPv4 or
IPv6 address.
diff --git a/Doc/library/plistlib.rst b/Doc/library/plistlib.rst
index ce6d4a8..5ded966 100644
--- a/Doc/library/plistlib.rst
+++ b/Doc/library/plistlib.rst
@@ -133,7 +133,7 @@
encoded data, which contains UID (see PList manual).
It has one attribute, :attr:`data`, which can be used to retrieve the int value
- of the UID. :attr:`data` must be in the range `0 <= data < 2**64`.
+ of the UID. :attr:`data` must be in the range ``0 <= data < 2**64``.
.. versionadded:: 3.8