> My apologies for the red herring. I was working from > a comment in my replacement ord() function. I dug up > an old copy of Python 2.4.3 and could not reproduce it > there either so I have no explanation for the comment > (which I wrote). Python 2.3 maybe?
No. The behavior you observed would only happen on a wide Unicode build (e.g. on Unix). > But regardless, the significant question is, what is > the reason for having ord() (and unichr) not work for > surrogate pairs and thus not usable with a large number > of unicode characters that Python otherwise supports? See PEP 261, http://www.python.org/dev/peps/pep-0261/ It specifies all this. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list