Florian Bruhin <python....@the-compiler.org> added the comment:

Ah, also see https://bugs.python.org/issue21071#msg292409 where the same thing 
was mentioned as part of another issue as well.

After some discussions in the Python IRC channel, I guess it's acceptable for 
dicts to raise a ByteWarning here - after all, there *is* a comparison between 
str/bytes going on here. It might be an implementation detail, but so is e.g.   
b'a' in ['a']   and I'd certainly expect that to give me a warning/error with 
-b/-bb.

So I guess if struct continues to accept bytes as format string, it should 
probably decode them to ASCII or something before interacting with the cache?

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41777>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to