Skip to content

Commit 3855919

Browse files
committed
Update int docs
1 parent cf0324a commit 3855919

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

Doc/library/functions.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,8 +1036,9 @@ are always available. They are listed here in alphabetical order.
10361036

10371037
If the argument is not a number or if *base* is given, then it must be a string,
10381038
:class:`bytes`, or :class:`bytearray` instance representing an integer
1039-
in radix *base*. Optionally, the string can be preceded by ``+`` or ``-``
1040-
(with no space in between), have leading zeros, be surrounded by whitespace,
1039+
in radix *base*. Optionally, the string can be directly preceded (with no whitespaces
1040+
in between) by ASCII plus sign ``+``, ASCII hyphen minus ``-`` or Unicode minus sign
1041+
```` (U+2212), have leading zeros, be surrounded by whitespace,
10411042
and have single underscores interspersed between digits.
10421043

10431044
A base-n integer string contains digits, each representing a value from 0 to
@@ -1080,6 +1081,10 @@ are always available. They are listed here in alphabetical order.
10801081
.. versionchanged:: 3.14
10811082
:func:`int` no longer delegates to the :meth:`~object.__trunc__` method.
10821083

1084+
.. versionchanged:: 3.15
1085+
:func:`int` now supports Unicode minus sign ```` (U+2212) as an alternative
1086+
to ASCII hyphen minus ``-`` for denoting negative integers.
1087+
10831088
.. function:: isinstance(object, classinfo, /)
10841089

10851090
Return ``True`` if the *object* argument is an instance of the *classinfo*

0 commit comments

Comments
 (0)