Re: Python & Unicode decimal interpretation

2005-12-03 Thread Martin v. Löwis
Scott David Daniels wrote: >> >>> int(u"\N{DEVANAGARI DIGIT SEVEN}") >> 7 > > OK, That much I have handled. I am fiddling with direct-to-number > conversions and wondering about cases like >>>> int(u"\N{DEVANAGARI DIGIT SEVEN}" + XXX >+ u"\N{DEVANAGARI DIGIT SEVEN}") int() passe

Re: Python & Unicode decimal interpretation

2005-12-03 Thread Scott David Daniels
Martin v. Löwis wrote: > Scott David Daniels wrote: >> In reading over the source for CPython's PyUnicode_EncodeDecimal, >> I see a dance to handle characters which are neither dec-equiv nor >> in Latin-1. Does anyone know about the intent of such a conversion? > > To support this: > > >>> int(

Re: Python & Unicode decimal interpretation

2005-12-03 Thread Martin v. Löwis
Scott David Daniels wrote: > In reading over the source for CPython's PyUnicode_EncodeDecimal, > I see a dance to handle characters which are neither dec-equiv nor > in Latin-1. Does anyone know about the intent of such a conversion? To support this: >>> int(u"\N{DEVANAGARI DIGIT SEVEN}") 7 >

Python & Unicode decimal interpretation

2005-12-02 Thread Scott David Daniels
In reading over the source for CPython's PyUnicode_EncodeDecimal, I see a dance to handle characters which are neither dec-equiv nor in Latin-1. Does anyone know about the intent of such a conversion? As far as I can tell, error handling is one of: strict, replace, ignore, xmlcharrefreplace,