break unichr instead of fix ord?

"Martin v. Löwis" martin at v.loewis.de
Wed Aug 26 23:10:41 CEST 2009


> In Python 2.5 on Windows I could do [*1]:
> 
>   >>> a = unichr (65600)
>   >>> a[0],a[1]
>   (u'\ud800', u'\udc40')

I can't reproduce that. My copy of Python on Windows gives

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    unichr(65600)
ValueError: unichr() arg not in range(0x10000) (narrow Python build)

This is

Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit
(Intel)] on win32

Regards,
Martin



More information about the Python-list mailing list