Yury Selivanov added the comment:
Hi David,
Please see the attached patch. It doesn't make Signature.bind() exceptions look
exactly like system messages, but it's now much closer.
--
keywords: +patch
Added file: http://bugs.python.org/file39422/sig_exc.patch
Changes by Yury Selivanov yseliva...@gmail.com:
--
assignee: - yselivanov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24205
___
___
Martin Panter added the comment:
I think the patch is okay. Just beware that next(iter(kwargs)) can return
different names if there is more than one unexpected argument, so the error
message could vary. But it looks like the test cases are only when there is
exactly one extra argument, so no
Roundup Robot added the comment:
New changeset 3cc368d334c5 by Yury Selivanov in branch 'default':
Issue 24205: Improve inspect.Signature.bind() error messages.
https://hg.python.org/cpython/rev/3cc368d334c5
--
nosy: +python-dev
___
Python tracker
Changes by Yury Selivanov yseliva...@gmail.com:
--
resolution: - fixed
stage: - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24205
___
Changes by Martin Panter vadmium...@gmail.com:
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24205
___
___
Python-bugs-list
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24205
___
___
Python-bugs-list
New submission from R. David Murray:
I have an application where I'm calling a handler function with passed in
arguments. I want to generate an error if the handler is called with the wrong
arguments. I can't just catch TypeError since a TypeError could easily result
from some programming