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

STINNER Victor report at bugs.python.org
Thu Jan 7 03:01:54 CET 2010


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

The problem is specific to Python 2.x. With Python3, "%c" expects one unicode character (eg. "a").

My patch fixes the char => Py_UNICODE conversion, but raising an error is maybe better to be consistent with u"%s" % "\x80" (and prepare the migration the Python3).

----------

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


More information about the Python-bugs-list mailing list