diff options
author | Jeremy Paige <ucodery@gmail.com> | 2022-12-18 07:11:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-18 07:11:21 (GMT) |
commit | 1cf3d78c92eb07dc09d15cc2e773b0b1b9436825 (patch) | |
tree | 950b24de0922810627b4574db3661184259aeb7f /Doc/library | |
parent | 0fe61d0838218b18bcff4bf434beba3e8dbcc42b (diff) | |
download | cpython-1cf3d78c92eb07dc09d15cc2e773b0b1b9436825.zip cpython-1cf3d78c92eb07dc09d15cc2e773b0b1b9436825.tar.gz cpython-1cf3d78c92eb07dc09d15cc2e773b0b1b9436825.tar.bz2 |
Correct CVE-2020-10735 documentation (#100306)
Diffstat (limited to 'Doc/library')
-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 c785336..5a6b7d8 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -5480,7 +5480,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 @@ -5544,7 +5544,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``. @@ -5572,7 +5572,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: |