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
* *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).
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.
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.
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.
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
This is intended to provide protection against a denial-of-service caused
by carefully-chosen inputs that exploit the worst case performance of a
- dict insertion, O(n^2) complexity. See
+ dict insertion, O(n\ :sup:`2`) complexity. See
http://www.ocert.org/advisories/ocert-2011-003.html for details.
Changing hash values affects the iteration order of sets.
Hash randomization is intended to provide protection against a
denial-of-service caused by carefully-chosen inputs that exploit the worst
- case performance of a dict construction, O(n^2) complexity. See
+ case performance of a dict construction, O(n\ :sup:`2`) complexity. See
http://www.ocert.org/advisories/ocert-2011-003.html for details.
:envvar:`PYTHONHASHSEED` allows you to set a fixed value for the hash
limiting the size of source files. In particular, this affected the maximum
size of literal lists and dictionaries in Python source; occasionally people who
are generating Python code would run into this limit. A patch by Charles G.
-Waldman raises the limit from ``2^16`` to ``2^{32}``.
+Waldman raises the limit from ``2**16`` to ``2**32``.
Three new convenience functions intended for adding constants to a module's
dictionary at module initialization time were added: :func:`PyModule_AddObject`,
considered and traversed by the collector.
(Contributed by Antoine Pitrou; :issue:`4688`.)
-* Long integers are now stored internally either in base 2**15 or in base
- 2**30, the base being determined at build time. Previously, they
- were always stored in base 2**15. Using base 2**30 gives
+* Long integers are now stored internally either in base ``2**15`` or in base
+ ``2**30``, the base being determined at build time. Previously, they
+ were always stored in base ``2**15``. Using base ``2**30`` gives
significant performance improvements on 64-bit machines, but
benchmark results on 32-bit machines have been mixed. Therefore,
- the default is to use base 2**30 on 64-bit machines and base 2**15
+ the default is to use base ``2**30`` on 64-bit machines and base ``2**15``
on 32-bit machines; on Unix, there's a new configure option
:option:`!--enable-big-digits` that can be used to override this default.
Changes to Python's build process and to the C API include:
-* Integers are now stored internally either in base 2**15 or in base
- 2**30, the base being determined at build time. Previously, they
- were always stored in base 2**15. Using base 2**30 gives
+* Integers are now stored internally either in base ``2**15`` or in base
+ ``2**30``, the base being determined at build time. Previously, they
+ were always stored in base ``2**15``. Using base ``2**30`` gives
significant performance improvements on 64-bit machines, but
benchmark results on 32-bit machines have been mixed. Therefore,
- the default is to use base 2**30 on 64-bit machines and base 2**15
+ the default is to use base ``2**30`` on 64-bit machines and base ``2**15``
on 32-bit machines; on Unix, there's a new configure option
``--enable-big-digits`` that can be used to override this default.
.. nonce: THJSYB
.. section: Library
-Changed FeedParser feed() to avoid O(N**2) behavior when parsing long line.
+Changed FeedParser feed() to avoid O(N\ :sup:`2`) behavior when parsing long line.
Original patch by Raymond Hettinger.
..
Setting sys.tracebacklimit to None now causes using the default limit.
Setting sys.tracebacklimit to an integer larger than LONG_MAX now means using
the limit LONG_MAX rather than the default limit.
-Fixed integer overflows in the case of more than 2**31 traceback items on
+Fixed integer overflows in the case of more than ``2**31`` traceback items on
Windows.
Fixed output errors handling.
Setting sys.tracebacklimit to None now causes using the default limit.
Setting sys.tracebacklimit to an integer larger than LONG_MAX now means using
the limit LONG_MAX rather than the default limit.
-Fixed integer overflows in the case of more than 2**31 traceback items on
+Fixed integer overflows in the case of more than ``2**31`` traceback items on
Windows.
Fixed output errors handling.
On Windows, fix multiprocessing.Connection for very large read: fix
_winapi.PeekNamedPipe() and _winapi.ReadFile() for read larger than INT_MAX
-(usually 2^31-1).
+(usually ``2**31-1``).
..
.. section: Core and Builtins
:class:`bytearray`, :class:`~array.array` and :class:`~mmap.mmap` objects
-allow now to export more than 2**31 buffers at a time.
+allow now to export more than ``2**31`` buffers at a time.
..