Message91232
The bit that most convinces me that *some* change is desirable is that
(with py3k notation), int('7', 16) is legal but int('F', 16) is not.
In an ideal world one might hope that the set of characters accepted by
int(s, 16) would be the same as those characters with the Unicode
Hex_Digits property, but currently there's a mismatch for two different
reasons... (1) fullwidth hex digits have property 'Hex_Digit' but aren't
accepted, and (2) non-European decimal digits (e.g. Devanagari digits,
etc.) don't have property 'Hex_Digit' but are accepted by int.
It's tempting to suggest that int and float should be modified to reject
*any* decimal digits other than '0' through '9', and possibly their
fullwidth variants. (Jean-Paul Calderone already advanced this argument
on #python-dev a few days ago; essentially saying, if I understood him
correctly, that dealing with localization shouldn't be part of the job
of int or float.) |
|
Date |
User |
Action |
Args |
2009-08-03 17:06:59 | mark.dickinson | set | recipients:
+ mark.dickinson, lemburg, loewis, eric.smith, ezio.melotti |
2009-08-03 17:06:58 | mark.dickinson | set | messageid: <1249319218.72.0.779910191776.issue6632@psf.upfronthosting.co.za> |
2009-08-03 17:06:56 | mark.dickinson | link | issue6632 messages |
2009-08-03 17:06:56 | mark.dickinson | create | |
|