[New-bugs-announce] [issue37303] Rename parameter name of imghdr what

Dong-hee Na report at bugs.python.org
Sun Jun 16 00:55:09 EDT 2019


New submission from Dong-hee Na <donghee.na92 at gmail.com>:

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 filename.
https://docs.python.org/3/library/imghdr.html

note that sndhdr is already using this name.
https://github.com/python/cpython/blob/3a1d50e7e573efb577714146bed5c03b9c95f466/Lib/sndhdr.py#L52

If this proposal is accepted, I'd like to send a patch for it.

----------
components: Library (Lib)
messages: 345727
nosy: corona10
priority: normal
severity: normal
status: open
title: Rename parameter name of imghdr what
type: enhancement
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37303>
_______________________________________


More information about the New-bugs-announce mailing list