[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-12-10 Thread Martin Panter

Changes by Martin Panter :


--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-12-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c15f122617d5 by Martin Panter in branch '3.5':
Issue #26483: Clarify str.isdecimal() and isdigit()
https://hg.python.org/cpython/rev/c15f122617d5

New changeset bc7fc85beed1 by Martin Panter in branch '3.6':
Issues #28916, #26483: Merge stdtypes.rst from 3.5
https://hg.python.org/cpython/rev/bc7fc85beed1

New changeset b11850871300 by Martin Panter in branch 'default':
Issues #28916, #26483: Merge stdtypes.rst from 3.6
https://hg.python.org/cpython/rev/b11850871300

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-12-09 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee: docs@python -> martin.panter

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-12-09 Thread Martin Panter

Martin Panter added the comment:

I’m okay with this version unless anyone has any more improvements.

--
stage: patch review -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-12-07 Thread Julien Palard

Changes by Julien Palard :


Added file: http://bugs.python.org/file45793/issue26483.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-12-01 Thread Julien Palard

Julien Palard added the comment:

“digits which do not form decimal radix forms”

> “forming a form” seems a long way of saying very little. The difference seems 
> a bit vague

> I gather that digits not in the Unicode “decimal digit” category are often 
> (always?) still decimal digits

I expected them not to, but they often are representative of a base 10 value:

>>> import sys
>>> import unicodedata
>>> chars = ''.join(map(chr, range(sys.maxunicode+1)))
>>> decimals = ''.join(filter(str.isdecimal, chars))
>>> digits = ''.join(filter(str.isdigit, chars))
>>> non_decimal_digits = set(digits) - set(decimals)
>>> from collections import Counter
>>> Counter([unicodedata.digit(char) for char in non_decimal_digits])
Counter({1: 15, 2: 14, 3: 14, 4: 14, 5: 13, 6: 13, 7: 13, 8: 13, 9: 13, 0: 6})

But, note that there's one more in the range [1,4], it's the 
[Kharosthi](https://en.wikipedia.org/wiki/Kharosthi) numbers, they do not use 
base 10 but a notation reminiscent of Roman numerals.

So here, clearly, all digits are not an notation for a base 10 value.
 
> but primarily used for a symbolic or typographical meaning more than in a 
> plain number, e.g. superscripts, subscripts and other fonts, added circles 
> and other decorations.

Which also can't be used to form a base 10 number.

So here is another proposition for isdecimal, probably more human friendly:

Return true if all characters in the string are decimal
characters and there is at least one character, false
otherwise. Decimal characters are those that can be used to form
numbers in base 10, e.g. U+0660, ARABIC-INDIC DIGIT
ZERO. Formally a decimal character is a character in the Unicode
General Category "Nd".

And here is another proposition for isdigit, probably friendlier too:

Return true if all characters in the string are digits and there is at 
least one
character, false otherwise.  Digits include decimal characters and digits 
that need
special handling, such as the compatibility superscript digits.
This covers digits which cannot be used to form numbers in base 10, like 
the Kharosthi numbers.
Formally, a digit is a character that has the property value
Numeric_Type=Digit or Numeric_Type=Decimal.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-11-30 Thread Martin Panter

Martin Panter added the comment:

“digits which do not form decimal radix forms”

I see you have taken this from a Unicode document, but “forming a form” seems a 
long way of saying very little. The difference seems a bit vague, but I gather 
that digits not in the Unicode “decimal digit” category are often (always?) 
still decimal digits, but primarily used for a symbolic or typographical 
meaning more than in a plain number, e.g. superscripts, subscripts and other 
fonts, added circles and other decorations.

--
stage: needs patch -> patch review
versions: +Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-11-26 Thread Julien Palard

Julien Palard added the comment:

Proposing a patch.

--
keywords: +patch
Added file: http://bugs.python.org/file45653/issue26483.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-03-12 Thread Julien

Julien added the comment:

To dig further, the DIGIT_MASK and DECIMAL_MASK used in `unicodeobject.c` are 
from `unicodectype.c` and they match values from `unicodetype_db.h` witch is 
generated by `Tools/unicode/makeunicodedata.py` which built those masks this 
way:

# decimal digit, integer digit
decimal = 0
if record[6]:
flags |= DECIMAL_MASK
decimal = int(record[6])
digit = 0
if record[7]:
flags |= DIGIT_MASK
digit = int(record[7])
if record[8]:
flags |= NUMERIC_MASK
numeric.setdefault(record[8], []).append(char)

Those "record"s are documented in 
ftp://unicode.org/Public/3.2-Update/UnicodeData-3.2.0.html in which fields 6, 
7, and 8 are:

 - 6Decimal digit value N   This is a numeric field. If the 
character has the decimal digit property, as specified in Chapter 4 of the 
Unicode Standard, the value of that digit is represented with an integer value 
in this field

 - 7Digit value N   This is a numeric field. If the character 
represents a digit, not necessarily a decimal digit, the value is here. This 
covers digits which do not form decimal radix forms, such as the compatibility 
superscript digits

 - 8Numeric value   N   This is a numeric field. If the character has 
the numeric property, as specified in Chapter 4 of the Unicode Standard, the 
value of that character is represented with an integer or rational number in 
this field. This includes fractions as, e.g., "1/5" for U+2155 VULGAR FRACTION 
ONE FIFTH Also included are numerical values for compatibility characters such 
as circled numbers.

Which is very close of the actual documentation. Yet the documentation is 
misleading using "This category includes digit characters" in the "isdecimal" 
documentation.

Posssible rewriting:

isdecimal: Return true if all characters in the string are decimal characters 
and there is at least one character, false otherwise. Decimal characters are 
those that can be used to form decimal-radix numbers, e.g. U+0660, ARABIC-INDIC 
DIGIT ZERO. Formally a decimal character is a character in the Unicode General 
Category "Nd".

isdigit: Return true if all characters in the string are digits and there is at 
least one character, false otherwise. Digits include decimal characters and 
digits that need special handling, such as the compatibility superscript 
digits. This covers digits which do not form decimal radix forms. Formally, a 
digit is a character that has the property value Numeric_Type=Digit or 
Numeric_Type=Decimal.

I don't think we can refactor more than this without rewriting documentation 
for isnumeric which mentions the Unicode standard the same way.

--
nosy: +sizeof

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-03-12 Thread Anna Koroliuk

Anna Koroliuk added the comment:

Hi, all!

At Helsinki Python sprint I with the kind help of Ezio found two things. 

1) This code gives results which are attached in the file. I will just now show 
some interesting cases where isdigit() and isdecimal() give different results.

for c in map(chr, range(0x10)):
if unicodedata.digit(c, None) is not None: print(c, c.isdigit(), c.isdecimal())
... 

0 True True
1 True True
2 True True
² True False
³ True False
¹ True False
፩ True False
፪ True False
፫ True False
፬ True False
① True False
② True False
③ True False

So it's different commands, although for usual digits 0-9 in usual typewriting 
without those upper indexes etc they give same results. Full file 
command_comparison.txt is attached. 

2) Both commands isdigit() and isdecimal() are traced back that symbol is 
compared to a certain tables (masks), but masks are different. For isdigit() it 
is DIGIT_MASK = 0x04 and for isdecimal() is DECIMAL_MASK 0x02.

Here is how all the commands are traced to the mask. 

A) isdecimal()

./Objects/unicodeobject.c:{"isdecimal", (PyCFunction) unicode_isdecimal, 
METH_NOARGS, isdecimal__doc__},

./Objects/unicodeobject.c:
static PyObject*
unicode_isdecimal(PyObject *self)

if (length == 1)
return PyBool_FromLong(
Py_UNICODE_ISDECIMAL(PyUnicode_READ(kind, data, 0)));

./Include/unicodeobject.h:#define Py_UNICODE_ISDECIMAL(ch) 
_PyUnicode_IsDecimalDigit(ch)

./Objects/unicodectype.c:
int _PyUnicode_IsDecimalDigit(Py_UCS4 ch)
{
if (_PyUnicode_ToDecimalDigit(ch) < 0)
return 0;
return 1;
}

int _PyUnicode_ToDecimalDigit(Py_UCS4 ch)
{
const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);

return (ctype->flags & DECIMAL_MASK) ? ctype->decimal : -1;
}
./Objects/unicodectype.c:#define DECIMAL_MASK 0x02

B) isdigit()

./Objects/unicodeobject.c:{"isdigit", (PyCFunction) unicode_isdigit, 
METH_NOARGS, isdigit__doc__},

./Objects/unicodeobject.c: static PyObject*
unicode_isdigit(PyObject *self)
...
if (length == 1) {
const Py_UCS4 ch = PyUnicode_READ(kind, data, 0);
return PyBool_FromLong(Py_UNICODE_ISDIGIT(ch));
}

./Include/unicodeobject.h:#define Py_UNICODE_ISDIGIT(ch) _PyUnicode_IsDigit(ch)

./Objects/unicodectype.c: int _PyUnicode_IsDigit(Py_UCS4 ch)
{
if (_PyUnicode_ToDigit(ch) < 0)
return 0;
return 1;
}

int _PyUnicode_ToDigit(Py_UCS4 ch)
{
const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);

return (ctype->flags & DIGIT_MASK) ? ctype->digit : -1;
}

./Tools/unicode/makeunicodedata.py:DIGIT_MASK = 0x04

BR,
Anna

--
nosy: +Anna Koroliuk
Added file: http://bugs.python.org/file42149/command_comparison.txt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-03-11 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +terry.reedy
versions:  -Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-03-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

AFAIK ‘general category “Nd” ’ is the same as ‘the property value 
Numeric_Type=Decimal’.

Yet one related predicate is str.isnumeric().

https://docs.python.org/3/library/stdtypes.html?#str.isnumeric

Return true if all characters in the string are numeric characters, and there 
is at least one character, false otherwise. Numeric characters include digit 
characters, and all characters that have the Unicode numeric value property, 
e.g. U+2155, VULGAR FRACTION ONE FIFTH. Formally, numeric characters are those 
with the property value Numeric_Type=Digit, Numeric_Type=Decimal or 
Numeric_Type=Numeric.

>>> numerics = ''.join(filter(str.isnumeric, chars))
>>> ''.join(sorted(set(digits) - set(numerics)))
''
>>> ''.join(sorted(set(numerics) - set(digits)))
'¼½¾৴৵৶৷৸৹୲୳୴୵୶୷௰௱௲౸౹౺౻౼౽౾൰൱൲൳൴൵༪༫༬༭༮༯༰༱༲༳፲፳፴፵፶፷፸፹፺፻፼ᛮᛯᛰ៰៱៲៳៴៵៶៷៸៹⅐⅑⅒⅓⅔⅕⅖⅗⅘⅙⅚⅛⅜⅝⅞⅟ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫⅬⅭⅮⅯⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹⅺⅻⅼⅽⅾⅿↀↁↂↅↆↇↈ↉⑩⑪⑫⑬⑭⑮⑯⑰⑱⑲⑳⑽⑾⑿⒀⒁⒂⒃⒄⒅⒆⒇⒑⒒⒓⒔⒕⒖⒗⒘⒙⒚⒛⓫⓬⓭⓮⓯⓰⓱⓲⓳⓴⓾❿➉➓⳽〇〡〢〣〤〥〦〧〨〩〸〹〺㆒㆓㆔㆕㈠㈡㈢㈣㈤㈥㈦㈧㈨㈩㉈㉉㉊㉋㉌㉍㉎㉏㉑㉒㉓㉔㉕㉖㉗㉘㉙㉚㉛㉜㉝㉞㉟㊀㊁㊂㊃㊄㊅㊆㊇㊈㊉㊱㊲㊳㊴㊵㊶㊷㊸㊹㊺㊻㊼㊽㊾㊿㐅㒃㠪㭍一七万三九二五亖亿什仟仨伍佰億兆兩八六十千卄卅卌叁参參叄四壱壹幺廾廿弌弍弎弐拾捌柒漆玖百肆萬貮貳贰阡陆陌陸零ꛦꛧꛨꛩꛪꛫꛬꛭꛮꛯ꠰꠱꠲꠳꠴꠵參拾兩零六陸什ćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸƊƋˡˢˣˤ˥˦˧˨˩˪˫ˬ˭ˮ˯˰˱˲˳˴˵˶˷˸˹˺˻̡̢̠̣́͊ϑϒϓϔϕࡘ࡙࡚࡛࡜࡝࡞࡟ࡹࡺࡻࡼࡽࡾࡿࢧࢨࢩࢪࢫࢬࢭࢮࢯࣻࣼࣽࣾࣿखगघङचछ়ঽীুূৃৄ৅৆েৈ৉৊োৌ্ৎ৏৒৓৔৕৖ৗ৘৙৚৛ড়ঢ়৞য়ৠৡৢৣ৤৥০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻ৼ৽৾৿੄੅੆ੇ੽੾ઝઞટ૫૬૭૮૯୘୙୚୛ଡ଼ଢ଼୞ୟ୸୹୺୻୼୽୾୿னப஫஬஭மய೺೻೼೽೾೿๩๪๫๬๭๮๯๰๱๲๳๴๵๶๷๸๹๺๻๼๽๾ၛၜၝၞၟၠၡၢၣၤၥᇡᇢᇣᇤᇥᇦᇧᇨᇩᇪᇫᇬᇭᇮᇯᇰᇱᇲᇳᇴ᜺᜻ᣪᣫᣬᣭᣮᣯᣰᣱᣲ␀␁␂␃␄␅␆␇␈␉␊␋␌␍␎␏␐␑␒␓␔␕␖␗␘␙␚␛␜␝␞␟␠␡␢␣␤␥␦␧␨␩␪␫␬␭␮␯␰␱␲␳␴␵␶␷␸␹␺␻␼␽␾␿⑀⑁⑂⑃⑄⑅⑆⑇⑈⑉⑊⑋⑌⑍⑎⑏⑐⑑⑒⑓⑔⑕⑖⑗⑘⑙⑚⑛⑜⑝⑞⑟①②③④⑤⑥⑦⑧⑨⑩⑪⑫⑬⑭⑮歛歜歝歞歟歠歡퍠퍡퍢퍣퍤퍥퍦퍧퍨퍩퍪퍫퍬퍭퍮퍯퍰퍱dâġपঃঌজ૪૽ଙ⎐⦘㬛扭'

decimals is a subset of digits, and digits is a subset of numerics.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-03-06 Thread Martin Panter

Martin Panter added the comment:

The documentation could certainly be clarified to say that all decimals, as 
determined by isdecimal(), are also digits as determined by isdigit(). IMO the 
current documentation is confusing or wrong to stay that decimals ‘include 
digit characters’; it is actually the other way around.

I think it could also be clearer about how ‘general category “Nd” ’ and ‘the 
property value Numeric_Type=Digit or Numeric_Type=Decimal’ are related (if they 
are indeed related).

--
nosy: +martin.panter

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-03-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yes. For details you need to read The Unicode Standard.

And every decimal character is accepted by the int() constructor, but 
non-decimal digits are not.

>>> for d in decimals: x = int(d)
... 
>>> for d in set(digits) - set(decimals):
... try:
... int(d)
... except ValueError:
... pass
... else:
... raise AssertionError
...

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-03-04 Thread Ethan Furman

Ethan Furman added the comment:

I like those code snippets!  Thanks, Serhiy!

Just to make sure I have understood correctly:  every decimal char is also a 
digit char, but some digit chars are not decimal chars.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-03-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

>>> chars = ''.join(map(chr, range(sys.maxunicode+1)))
>>> digits = ''.join(filter(str.isdigit, chars))
>>> digits
'0123456789²³¹٠١٢٣٤٥٦٧٨٩۰۱۲۳۴۵۶۷۸۹߀߁߂߃߄߅߆߇߈߉०१२३४५६७८९০১২৩৪৫৬৭৮৯੦੧੨੩੪੫੬੭੮੯૦૧૨૩૪૫૬૭૮૯୦୧୨୩୪୫୬୭୮୯௦௧௨௩௪௫௬௭௮௯౦౧౨౩౪౫౬౭౮౯೦೧೨೩೪೫೬೭೮೯൦൧൨൩൪൫൬൭൮൯෦෧෨෩෪෫෬෭෮෯๐๑๒๓๔๕๖๗๘๙໐໑໒໓໔໕໖໗໘໙༠༡༢༣༤༥༦༧༨༩၀၁၂၃၄၅၆၇၈၉႐႑႒႓႔႕႖႗႘႙፩፪፫፬፭፮፯፰፱០១២៣៤៥៦៧៨៩᠐᠑᠒᠓᠔᠕᠖᠗᠘᠙᥆᥇᥈᥉᥊᥋᥌᥍᥎᥏᧐᧑᧒᧓᧔᧕᧖᧗᧘᧙᧚᪀᪁᪂᪃᪄᪅᪆᪇᪈᪉᪐᪑᪒᪓᪔᪕᪖᪗᪘᪙᭐᭑᭒᭓᭔᭕᭖᭗᭘᭙᮰᮱᮲᮳᮴᮵᮶᮷᮸᮹᱀᱁᱂᱃᱄᱅᱆᱇᱈᱉᱐᱑᱒᱓᱔᱕᱖᱗᱘᱙⁰⁴⁵⁶⁷⁸⁹₀₁₂₃₄₅₆₇₈₉①②③④⑤⑥⑦⑧⑨⑴⑵⑶⑷⑸⑹⑺⑻⑼⒈⒉⒊⒋⒌⒍⒎⒏⒐⓪⓵⓶⓷⓸⓹⓺⓻⓼⓽⓿❶❷❸❹❺❻❼❽❾➀➁➂➃➄➅➆➇➈➊➋➌➍➎➏➐➑➒꘠꘡꘢꘣꘤꘥꘦꘧꘨꘩꣐꣑꣒꣓꣔꣕꣖꣗꣘꣙꤀꤁꤂꤃꤄꤅꤆꤇꤈꤉꧐꧑꧒꧓꧔꧕꧖꧗꧘꧙꧰꧱꧲꧳꧴꧵꧶꧷꧸꧹꩐꩑꩒꩓꩔꩕꩖꩗꩘꩙꯰꯱꯲꯳꯴꯵꯶꯷꯸꯹0123456789ҠҡҢңҤҥҦҧҨҩੀੁੂ੃๠๡๢๣๤๥๦๧๨ၒၓၔၕၖၗၘၙၚၦၧၨၩၪၫၬၭၮၯჰჱჲჳჴჵჶჷჸჹᄶᄷᄸᄹᄺᄻᄼᄽᄾᄿᇐᇑᇒᇓᇔᇕᇖᇗᇘᇙደዱዲዳዴድዶዷዸዹᓐᓑᓒᓓᓔᓕᓖᓗᓘᓙᙐᙑᙒᙓᙔᙕᙖᙗᙘᙙᛀᛁᛂᛃᛄᛅᛆᛇᛈᛉᜰᜱᜲᜳ᜴᜵᜶᜷᜸᜹ᣠᣡᣢᣣᣤᣥᣦᣧᣨᣩ橠橡橢橣橤橥橦橧橨橩歐歑歒歓歔歕歖歗歘歙ퟎퟏퟐퟑퟒퟓퟔퟕퟖퟗퟘퟙퟚퟛퟜퟝퟞퟟퟠퟡퟢퟣퟤퟥퟦퟧퟨퟩퟪퟫퟬퟭퟮퟯퟰퟱퟲퟳퟴퟵퟶퟷퟸퟹퟺퟻ퟼퟽퟾퟿'
>>> decimals = ''.join(filter(str.isdecimal, chars))
>>> decimals
'0123456789٠١٢٣٤٥٦٧٨٩۰۱۲۳۴۵۶۷۸۹߀߁߂߃߄߅߆߇߈߉०१२३४५६७८९০১২৩৪৫৬৭৮৯੦੧੨੩੪੫੬੭੮੯૦૧૨૩૪૫૬૭૮૯୦୧୨୩୪୫୬୭୮୯௦௧௨௩௪௫௬௭௮௯౦౧౨౩౪౫౬౭౮౯೦೧೨೩೪೫೬೭೮೯൦൧൨൩൪൫൬൭൮൯෦෧෨෩෪෫෬෭෮෯๐๑๒๓๔๕๖๗๘๙໐໑໒໓໔໕໖໗໘໙༠༡༢༣༤༥༦༧༨༩၀၁၂၃၄၅၆၇၈၉႐႑႒႓႔႕႖႗႘႙០១២៣៤៥៦៧៨៩᠐᠑᠒᠓᠔᠕᠖᠗᠘᠙᥆᥇᥈᥉᥊᥋᥌᥍᥎᥏᧐᧑᧒᧓᧔᧕᧖᧗᧘᧙᪀᪁᪂᪃᪄᪅᪆᪇᪈᪉᪐᪑᪒᪓᪔᪕᪖᪗᪘᪙᭐᭑᭒᭓᭔᭕᭖᭗᭘᭙᮰᮱᮲᮳᮴᮵᮶᮷᮸᮹᱀᱁᱂᱃᱄᱅᱆᱇᱈᱉᱐᱑᱒᱓᱔᱕᱖᱗᱘᱙꘠꘡꘢꘣꘤꘥꘦꘧꘨꘩꣐꣑꣒꣓꣔꣕꣖꣗꣘꣙꤀꤁꤂꤃꤄꤅꤆꤇꤈꤉꧐꧑꧒꧓꧔꧕꧖꧗꧘꧙꧰꧱꧲꧳꧴꧵꧶꧷꧸꧹꩐꩑꩒꩓꩔꩕꩖꩗꩘꩙꯰꯱꯲꯳꯴꯵꯶꯷꯸꯹0123456789ҠҡҢңҤҥҦҧҨҩၦၧၨၩၪၫၬၭၮၯჰჱჲჳჴჵჶჷჸჹᄶᄷᄸᄹᄺᄻᄼᄽᄾᄿᇐᇑᇒᇓᇔᇕᇖᇗᇘᇙደዱዲዳዴድዶዷዸዹᓐᓑᓒᓓᓔᓕᓖᓗᓘᓙᙐᙑᙒᙓᙔᙕᙖᙗᙘᙙᛀᛁᛂᛃᛄᛅᛆᛇᛈᛉᜰᜱᜲᜳ᜴᜵᜶᜷᜸᜹ᣠᣡᣢᣣᣤᣥᣦᣧᣨᣩ橠橡橢橣橤橥橦橧橨橩歐歑歒歓歔歕歖歗歘歙ퟎퟏퟐퟑퟒퟓퟔퟕퟖퟗퟘퟙퟚퟛퟜퟝퟞퟟퟠퟡퟢퟣퟤퟥퟦퟧퟨퟩퟪퟫퟬퟭퟮퟯퟰퟱퟲퟳퟴퟵퟶퟷퟸퟹퟺퟻ퟼퟽퟾퟿'
>>> ''.join(sorted(set(decimals) - set(digits)))
''
>>> ''.join(sorted(set(digits) - set(decimals)))
'²³¹፩፪፫፬፭፮፯፰፱᧚⁰⁴⁵⁶⁷⁸⁹₀₁₂₃₄₅₆₇₈₉①②③④⑤⑥⑦⑧⑨⑴⑵⑶⑷⑸⑹⑺⑻⑼⒈⒉⒊⒋⒌⒍⒎⒏⒐⓪⓵⓶⓷⓸⓹⓺⓻⓼⓽⓿❶❷❸❹❺❻❼❽❾➀➁➂➃➄➅➆➇➈➊➋➌➍➎➏➐➑➒ੀੁੂ੃๠๡๢๣๤๥๦๧๨ၒၓၔၕၖၗၘၙၚ'

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-03-04 Thread Ezio Melotti

Changes by Ezio Melotti :


--
assignee:  -> docs@python
components: +Documentation, Unicode
nosy: +docs@python, ezio.melotti, haypo
stage:  -> needs patch
type:  -> enhancement
versions: +Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-03-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
title: docs unclear on difference between isdigt() and isdecimal() -> docs 
unclear on difference between str.isdigit() and str.isdecimal()

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com