[issue19099] struct.pack fails first time with unicode fmt

Serhiy Storchaka report at bugs.python.org
Tue Oct 1 14:55:19 CEST 2013


Serhiy Storchaka added the comment:

> Other than that, should we raise struct.error instead of ValueError?

Python 3 raises UnicodeEncodeError. And Python 2 raises UnicodeEncodeError when coerce non-ASCII unicode to str.

----------

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


More information about the Python-bugs-list mailing list