| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
to functions implemented in C that don't support this.
There was a problem hiding this comment.
LGTM, I also like included cleanup changes ;-)
On the issue, I requested unit tests. But I also proposed to change the error message, so we write tests later, when we agree on what should be done.
Sorry, something went wrong.
|
|
||
| def test_varargs0_kw(self): | ||
| self.assertRaises(TypeError, {}.__contains__, x=2) | ||
|
|
There was a problem hiding this comment.
You may keep this test for other Python implementations. (This test doesn't check the error message.)
Sorry, something went wrong.
There was a problem hiding this comment.
This is a duplicate of the following test.
Sorry, something went wrong.
There was a problem hiding this comment.
Oh ok, you are right.
Sorry, something went wrong.
| except TypeError as err: | ||
| # we expect type errors because of wrong argument count | ||
| self.assertNotIn("does not take keyword arguments", err.args[0]) | ||
| print(repr(err)) |
There was a problem hiding this comment.
Remove print()?
Sorry, something went wrong.
There was a problem hiding this comment.
Done.
Sorry, something went wrong.
| break; | ||
|
|
||
| case METH_VARARGS: | ||
| if (!(flags & METH_KEYWORDS) && nkwargs) { |
There was a problem hiding this comment.
Is "!(flags & METH_KEYWORDS)" still needed?
Sorry, something went wrong.
There was a problem hiding this comment.
Not needed. Removed.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM.
Sorry, something went wrong.
|
Thank you for your review @Haypo. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
to functions implemented in C that don't support this.