[issue7649] "u'%c' % char" broken for chars in range '\x80'-'\xFF'

Eric Smith report at bugs.python.org
Wed Feb 24 19:17:58 CET 2010


Eric Smith <eric at trueblade.com> added the comment:

Of course. Sorry about that.

But then why not copy unichr()? It calls PyUnicode_FromOrdinal.

I guess my real question is:

Should "'%c' % i" be identical to "chr(i)" and should "u'%c' % i" be identical to "unichr(i)"?

And by "identical" I mean return the same results and throw the same errors (with a possible difference in the error text).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7649>
_______________________________________


More information about the Python-bugs-list mailing list