Mark Dickinson <dicki...@gmail.com> added the comment:

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.)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6632>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to