Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
further clarify unicode decimal digit
  • Loading branch information
hauntsaninja committed Dec 24, 2022
commit 08ef0878c39d6aab019b206a7de76a670010f8ad
18 changes: 9 additions & 9 deletions Doc/library/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -895,15 +895,15 @@ are always available. They are listed here in alphabetical order.
preceded by ``+`` or ``-`` (with no space in between), have leading zeros,
or be surrounded by whitespace.

A base-n literal consists of Unicode digits representing 0 to n-1, with ``a``
to ``z`` (or ``A`` to ``Z``) having
values 10 to 35. The default *base* is 10. The allowed bases are 0 and 2--36.
Base-2, -8, and -16 literals can be optionally prefixed with ``0b``/``0B``,
``0o``/``0O``, or ``0x``/``0X``, as with integer literals in code. Base 0
means to interpret similar to a :ref:`code literal <integers>`, in that the
actual base is 2, 8, 10, or 16 as determined by the prefix. Base 0 also
disallows leading zeros: ``int('010', 0)`` is not legal, while ``int('010')``
and ``int('010', 8)`` are.
A base-n literal consists of digits representing 0 to n-1. The values 0--9
can be represented by any Unicode decimal digit. The values 10--35 can be
represented by ``a`` to ``z`` (or ``A`` to ``Z``). The default *base* is 10.
The allowed bases are 0 and 2--36. Base-2, -8, and -16 literals can be
optionally prefixed with ``0b``/``0B``, ``0o``/``0O``, or ``0x``/``0X``, as
with integer literals in code. Base 0 means to interpret similar to a
:ref:`code literal <integers>`, in that the actual base is 2, 8, 10, or 16 as
determined by the prefix. Base 0 also disallows leading zeros: ``int('010',
0)`` is not legal, while ``int('010')`` and ``int('010', 8)`` are.

The integer type is described in :ref:`typesnumeric`.

Expand Down