Berker Peksag added the comment:
Thanks for the review, David.
> The standard error message for this case is:
>
> xxx() got an unexpected keyword argument 'foo'
I found two similar messages in the codebase:
* In Modules/itertoolsmodule.c:
PyErr_SetString(PyExc_TypeError,
"zip_longest() got an unexpected keyword argument");
* In Python/ceval.c:
PyErr_Format(PyExc_TypeError,
"%U() got an unexpected "
"keyword argument '%S'",
co->co_name,
keyword);
But, in ImportError case it can take more than one keyword arguments:
ImportError(spam="SPAM", eggs=True)
What error message should be printed for the above case?
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue21578>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com