[issue19099] struct.pack fails first time with unicode fmt
Vajrasky Kok
report at bugs.python.org
Tue Oct 1 10:57:48 CEST 2013
Vajrasky Kok added the comment:
Serhiy, you don't want to clear the cache in the test to simulate the bug?
struct._clearcache()
Other than that, should we raise struct.error instead of ValueError? Right now, the current behaviour in python 2.7 is:
>>> struct.pack('\x80', 3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
struct.error: bad char in struct format
But you are right. Struct() should have been changed instead of struct.pack.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19099>
_______________________________________
More information about the Python-bugs-list
mailing list