Serhiy Storchaka added the comment:
Inlike to sndhdr.what(), imghdr.what() accepts not only file names, by file
objects theirself. The feature was added at 1997 in
45ac47c0b2798cc3a29cf5111694aba5e9347e08.
--
nosy: +serhiy.storchaka
resolution: -> rejected
stage: -> resolved
status
Karthikeyan Singaravelan added the comment:
file can be a positional or keyword argument. Someone might be using it as a
keyword argument and this would require a deprecation period before renaming
could be done.
./python.exe
Python 3.9.0a0 (heads/master:7a68f8c28b, Jun 15 2019, 21:00:05)
[C
New submission from Dong-hee Na :
Still
https://github.com/python/cpython/blob/3a1d50e7e573efb577714146bed5c03b9c95f466/Lib/imghdr.py#L11
signature is def what(file, h=None).
I 'd like to suggest to update it into def what(filename, h=None)
Also, the doc of imghdr represents it as the filenam