This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author berker.peksag
Recipients berker.peksag, brett.cannon, eric.snow, r.david.murray
Date 2014-10-05.02:23:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1412475840.31.0.429242769517.issue21578@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2014-10-05 02:24:00berker.peksagsetrecipients: + berker.peksag, brett.cannon, r.david.murray, eric.snow
2014-10-05 02:24:00berker.peksagsetmessageid: <1412475840.31.0.429242769517.issue21578@psf.upfronthosting.co.za>
2014-10-05 02:24:00berker.peksaglinkissue21578 messages
2014-10-05 02:23:59berker.peksagcreate