summaryrefslogtreecommitdiff
path: root/Objects/abstract.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r--Objects/abstract.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 67b163d7b7..8d1eddc093 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -2409,8 +2409,7 @@ _PyStack_UnpackDict(PyObject **args, Py_ssize_t nargs, PyObject *kwargs,
assert(nargs >= 0);
assert(kwargs == NULL || PyDict_CheckExact(kwargs));
- nkwargs = (kwargs != NULL) ? PyDict_Size(kwargs) : 0;
- if (!nkwargs) {
+ if (kwargs == NULL || (nkwargs = PyDict_GET_SIZE(kwargs)) == 0) {
*p_kwnames = NULL;
return args;
}