[Python-Dev] Internationalization Toolkit

M.-A. Lemburg mal@lemburg.com
Thu, 11 Nov 1999 15:23:45 +0100


Tim Peters wrote:
> 
> [MAL, on Unicode chr() and ord()
> > ...
> > Because unichr() will always have to return Unicode objects. You don't
> > want chr(i) to return Unicode for i>255 and strings for i<256.
> 
> Indeed I do not!
> 
> > OTOH, ord() could probably be extended to also work on Unicode objects.
> 
> I think should be -- it's a good & natural use of polymorphism; introducing
> a new function *here* would be as odd as introducing a unilen() function to
> get the length of a Unicode string.

Fine. So I'll drop the uniord() API and extend ord() instead.

-- 
Marc-Andre Lemburg
______________________________________________________________________
Y2000:                                                    50 days left
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/