[issue19231] ctype cant's use printf

Georg Brandl report at bugs.python.org
Sat Oct 12 14:19:11 CEST 2013


Georg Brandl added the comment:

In Python 3, "hello\n" is a Unicode string. printf() expects a byte string, so you should use b"hello\n" (or s.encode() for string object named "s").

----------
nosy: +georg.brandl
resolution:  -> invalid
status: open -> closed

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


More information about the Python-bugs-list mailing list