Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcf71e19

Browse files
gpsheaducodery
andauthored
[3.9] CorrectCVE-2020-10735 documentation (GH-100306). (#100697)
(cherry picked from commit1cf3d78)(cherry picked from commit88fe8d7)Co-authored-by: Jeremy Paige <ucodery@gmail.com>Co-authored-by: Gregory P. Smith <greg@krypto.org>
1 parent5ef90ee commitcf71e19

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

‎Doc/library/stdtypes.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5254,7 +5254,7 @@ to mitigate denial of service attacks. This limit *only* applies to decimal or
52545254
other non-power-of-two number bases. Hexadecimal, octal, and binary conversions
52555255
are unlimited. The limit can be configured.
52565256

5257-
The:class:`int` type in CPython is anabitrary length number stored in binary
5257+
The:class:`int` type in CPython is anarbitrary length number stored in binary
52585258
form (commonly known as a "bignum"). There exists no algorithm that can convert
52595259
a string to a binary integer or a binary integer to a string in linear time,
52605260
*unless* the base is a power of 2. Even the best known algorithms for base 10
@@ -5318,7 +5318,7 @@ and :class:`str` or :class:`bytes`:
53185318
* ``int(string)`` with default base 10.
53195319
* ``int(string, base)`` for all bases that are not a power of 2.
53205320
* ``str(integer)``.
5321-
* ``repr(integer)``
5321+
* ``repr(integer)``.
53225322
* any other string conversion to base 10, for example ``f"{integer}"``,
53235323
``"{}".format(integer)``, or ``b"%d" % integer``.
53245324

@@ -5346,7 +5346,7 @@ command line flag to configure the limit:
53465346
:envvar:`PYTHONINTMAXSTRDIGITS` or:option:`-X int_max_str_digits <-X>`.
53475347
If both the env var and the ``-X`` option are set, the ``-X`` option takes
53485348
precedence. A value of *-1* indicates that both were unset, thus a value of
5349-
:data:`sys.int_info.default_max_str_digits` was used duringinitilization.
5349+
:data:`sys.int_info.default_max_str_digits` was used duringinitialization.
53505350

53515351
From code, you can inspect the current limit and set a new one using these
53525352
:mod:`sys` APIs:

‎Python/clinic/sysmodule.c.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎Python/sysmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1643,12 +1643,12 @@ sys_mdebug_impl(PyObject *module, int flag)
16431643
/*[clinic input]
16441644
sys.get_int_max_str_digits
16451645
1646-
Set the maximum string digits limit for non-binary int<->str conversions.
1646+
Return the maximum string digits limit for non-binary int<->str conversions.
16471647
[clinic start generated code]*/
16481648

16491649
staticPyObject*
16501650
sys_get_int_max_str_digits_impl(PyObject*module)
1651-
/*[clinic end generated code: output=0042f5e8ae0e8631 input=8dab13e2023e60d5]*/
1651+
/*[clinic end generated code: output=0042f5e8ae0e8631 input=61bf9f99bc8b112d]*/
16521652
{
16531653
PyInterpreterState*interp=_PyInterpreterState_GET();
16541654
returnPyLong_FromSsize_t(interp->int_max_str_digits);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp