Alexander Belopolsky <belopol...@users.sourceforge.net> added the comment:

On Sun, Nov 28, 2010 at 11:37 AM, Mark Dickinson <rep...@bugs.python.org> wrote:
>
> Mark Dickinson <dicki...@gmail.com> added the comment:
>
>> I am not sure, whether support for non-ascii digits in float()
>> constructor is worth maintaining.
>
> I'd be very happy to drop such support.  If you allow alternative digit sets, 
> trying to work out exactly what should
> be supported and what shouldn't gets very messy;  it's even worse for int(), 
> where bases > 10 have to be taken
> into account.
>

I think there is a proposal (if not already in Unicode 6.0) to add
hexadecimal value property to UCD, but I don't think it is right for
int() and float() to depend on UCD in the first place.  If people need
to process exotic decimals, we can expose 'decimal' encoding, however,
translating from code-point to decimal value is trivial - just
subtract the code-point value for zero.

>> (Anyone knows whether Arabic numbers are written right to left
>> or left to right?  What is the proper decimal point character?)
>
> Well, judging by the chocolate packaging I saw recently, they're written left 
> to right
> (so presumably if you're reading right-to-left, you see the units first, then 
> the tens, etc.,
> which always struck me as the 'right' way to write things in the first place 
> :-).

Did your chocolate packaging use European digits or Arabic-Indic ones?
 Note that they have different bidi properties:

'EN'
>>> unicodedata.bidirectional('\N{ARABIC-INDIC DIGIT ONE}')
'AN'

(I am not sure what 'AN' (Arabic Numeral?) bidi property actually mean.)

----------

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

Reply via email to