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

Commit88fe8d7

Browse files
gpsheaducodery
andauthored
[3.10] CorrectCVE-2020-10735 documentation (pythonGH-100306). (python#100477)
(cherry picked from commit1cf3d78)Co-authored-by: Jeremy Paige <ucodery@gmail.com>
1 parent9c4b8cc commit88fe8d7

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
@@ -5427,7 +5427,7 @@ to mitigate denial of service attacks. This limit *only* applies to decimal or
54275427
other non-power-of-two number bases. Hexadecimal, octal, and binary conversions
54285428
are unlimited. The limit can be configured.
54295429

5430-
The:class:`int` type in CPython is anabitrary length number stored in binary
5430+
The:class:`int` type in CPython is anarbitrary length number stored in binary
54315431
form (commonly known as a "bignum"). There exists no algorithm that can convert
54325432
a string to a binary integer or a binary integer to a string in linear time,
54335433
*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`:
54915491
* ``int(string)`` with default base 10.
54925492
* ``int(string, base)`` for all bases that are not a power of 2.
54935493
* ``str(integer)``.
5494-
* ``repr(integer)``
5494+
* ``repr(integer)``.
54955495
* any other string conversion to base 10, for example ``f"{integer}"``,
54965496
``"{}".format(integer)``, or ``b"%d" % integer``.
54975497

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

55245524
From code, you can inspect the current limit and set a new one using these
55255525
: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
@@ -1659,12 +1659,12 @@ sys_mdebug_impl(PyObject *module, int flag)
16591659
/*[clinic input]
16601660
sys.get_int_max_str_digits
16611661
1662-
Set the maximum string digits limit for non-binary int<->str conversions.
1662+
Return the maximum string digits limit for non-binary int<->str conversions.
16631663
[clinic start generated code]*/
16641664

16651665
staticPyObject*
16661666
sys_get_int_max_str_digits_impl(PyObject*module)
1667-
/*[clinic end generated code: output=0042f5e8ae0e8631 input=8dab13e2023e60d5]*/
1667+
/*[clinic end generated code: output=0042f5e8ae0e8631 input=61bf9f99bc8b112d]*/
16681668
{
16691669
PyInterpreterState*interp=_PyInterpreterState_GET();
16701670
returnPyLong_FromSsize_t(interp->int_max_str_digits);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp