mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #6595: Allow Decimal constructor to accept non-European decimal digits, as recommended by the specification.
This commit is contained in:
parent
642d96a647
commit
345adc43a3
4 changed files with 28 additions and 20 deletions
|
@ -324,6 +324,11 @@ Decimal objects
|
|||
numeric-value ::= decimal-part [exponent-part] | infinity
|
||||
numeric-string ::= [sign] numeric-value | [sign] nan
|
||||
|
||||
Other Unicode decimal digits are also permitted where ``digit``
|
||||
appears above. These include decimal digits from various other
|
||||
alphabets (for example, Arabic-Indic and Devanāgarī digits) along
|
||||
with the fullwidth digits ``'\uff10'`` through ``'\uff19'``.
|
||||
|
||||
If *value* is a :class:`tuple`, it should have three components, a sign
|
||||
(:const:`0` for positive or :const:`1` for negative), a :class:`tuple` of
|
||||
digits, and an integer exponent. For example, ``Decimal((0, (1, 4, 1, 4), -3))``
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue