[issue19997] imghdr.what doesn't accept bytes paths

Claudiu.Popa report at bugs.python.org
Mon Jun 2 11:00:37 CEST 2014


Claudiu.Popa added the comment:

There are other modules with support for bytes filenames in their API:

bz2                          
codecs                       
gzip                         
lzma                         
pipes.Template               
tarfile
tokenize
fileinput
filecmp
sndhdr
configparser

Also, given the fact that sndhdr supports them and its purpose is similar with imghdr, it would be a surprise
for a beginner to find out that imghdr.what(b"img") is not working, while sndhdr.what(b"snd") works.

----------

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


More information about the Python-bugs-list mailing list