Author jlowin
Recipients jlowin, yselivanov
Date 2014-03-01.16:07:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I created a patch to resolve this. 

If a function has keyword-only arguments, then inspect.getcallargs checks if the argument is in kwonlydefaults. However, kwonlydefaults is None if no defaults were specified. In that situation, 'kwarg in kwonlydefaults' raises the TypeError.

The quick fix is simply to test kwonlydefaults before testing if kwarg is in it.

The test for this situation is a little verbose because a TypeError is expected and one is raised, just the wrong one, so I parse the error message.
Date User Action Args
2014-03-01 16:07:45jlowinsetrecipients: + jlowin, yselivanov
2014-03-01 16:07:45jlowinsetmessageid: <>
2014-03-01 16:07:45jlowinlinkissue20816 messages
2014-03-01 16:07:44jlowincreate