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 <rep...@bugs.python.org>
<http://bugs.python.org/issue19099>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to