[issue41749] Allow omission of imghdr.what file arg if bytes are given

Emmanuel Arias report at bugs.python.org
Tue Sep 15 20:09:31 EDT 2020


Emmanuel Arias <eamanu at yaerobi.com> added the comment:

> The opening message confused me by using 'need' as 'currently required to call' rather than 'required to compute (test) and necessarily needed to call'; but after reading the code, I believe I understand and modified title to match.

Sorry for my bad English, yes my idea was more likely your point of view. In the future I'll try to be more clear. 

> However, what is very problemmatic is requiring 1 of 2 different arguments.  For range, the first parameter is really 'start_or_stop', an int either way, with the interpretation depending on the presence of a second.  This is a nuisance for understanding, but a convenience in usage.  But I think requiring an argument (usually) passed positionally or an argument that now has to be passed by keyword, with an arbitrary letter name, is worse and less justified.  So my current view is that this change should be rejected.

My intention is try to avoid a call like `what(None, b'...')`. IMO call a function that start with None seems a little weird (from my point of view). Sincerely, I don't know if for the people it's ok use `what(None, b'...')` or not, probably not because haven't changed since 1997.

Reading your opinion it's more clear for me that this patch should be rejected. So, I'll close this issue and the PR.

Thanks for the feedback, very appreciate.

----------
stage: patch review -> resolved
status: open -> closed

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


More information about the Python-bugs-list mailing list