diff options
author | Gregory P. Smith <greg@krypto.org> | 2022-12-24 02:08:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-24 02:08:27 (GMT) |
commit | 88fe8d701af3316c8869ea18ea1c7acec6f68c04 (patch) | |
tree | 3b0614dd8bf71fccd19bb87c1aa9568be344bf0d /Doc | |
parent | 9c4b8cca09342734eb04fc1093d5952a2317dfb7 (diff) | |
download | cpython-88fe8d701af3316c8869ea18ea1c7acec6f68c04.zip cpython-88fe8d701af3316c8869ea18ea1c7acec6f68c04.tar.gz cpython-88fe8d701af3316c8869ea18ea1c7acec6f68c04.tar.bz2 |
[3.10] Correct CVE-2020-10735 documentation (GH-100306). (#100477)
(cherry picked from commit 1cf3d78c92eb07dc09d15cc2e773b0b1b9436825)
Co-authored-by: Jeremy Paige <ucodery@gmail.com>
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/stdtypes.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index d71d693..5750c7c 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -5427,7 +5427,7 @@ to mitigate denial of service attacks. This limit *only* applies to decimal or other non-power-of-two number bases. Hexadecimal, octal, and binary conversions are unlimited. The limit can be configured. -The :class:`int` type in CPython is an abitrary length number stored in binary +The :class:`int` type in CPython is an arbitrary length number stored in binary form (commonly known as a "bignum"). There exists no algorithm that can convert a string to a binary integer or a binary integer to a string in linear time, *unless* the base is a power of 2. Even the best known algorithms for base 10 @@ -5491,7 +5491,7 @@ and :class:`str` or :class:`bytes`: * ``int(string)`` with default base 10. * ``int(string, base)`` for all bases that are not a power of 2. * ``str(integer)``. -* ``repr(integer)`` +* ``repr(integer)``. * any other string conversion to base 10, for example ``f"{integer}"``, ``"{}".format(integer)``, or ``b"%d" % integer``. @@ -5519,7 +5519,7 @@ command line flag to configure the limit: :envvar:`PYTHONINTMAXSTRDIGITS` or :option:`-X int_max_str_digits <-X>`. If both the env var and the ``-X`` option are set, the ``-X`` option takes precedence. A value of *-1* indicates that both were unset, thus a value of - :data:`sys.int_info.default_max_str_digits` was used during initilization. + :data:`sys.int_info.default_max_str_digits` was used during initialization. From code, you can inspect the current limit and set a new one using these :mod:`sys` APIs: |