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

Serhiy Storchaka report at bugs.python.org
Mon Sep 30 20:23:39 CEST 2013


Serhiy Storchaka added the comment:

Struct constructor accepts only str and not unicode. But struct.pack() uses caching and it found Struct('B') in the cache (because u'B' and 'B' are equal and have same hash).

I doubt we should fix this. Adding support of Unicode argument is new feature.

----------
nosy: +mark.dickinson, meador.inge, pitrou, serhiy.storchaka

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


More information about the Python-bugs-list mailing list