Mercurial > cpython-lru_cache-weakref
diff Python/getargs.c @ 20708:e912b683ed3e legacy-trunk
vgetargskeywords(): remove test that can't succeed. Not a bugfix, just
removing useless obfuscation.
| author | Tim Peters <tim.peters@gmail.com> |
|---|---|
| date | Sat, 27 Oct 2001 00:17:34 +0000 |
| parents | 6c84d55abb58 |
| children | 310450e74f2f |
line wrap: on
line diff
--- a/Python/getargs.c Fri Oct 26 20:57:38 2001 +0000 +++ b/Python/getargs.c Sat Oct 27 00:17:34 2001 +0000 @@ -1028,9 +1028,9 @@ char *msg, *ks, **p; int nkwds, pos, match, converted; PyObject *key, *value; - + /* nested tuples cannot be parsed when using keyword arguments */ - + for (;;) { int c = *format++; if (c == '(') { @@ -1068,23 +1068,17 @@ tplen = PyTuple_GET_SIZE(args); /* do a cursory check of the keywords just to see how many we got */ - + + kwlen = 0; if (keywords) { if (!PyDict_Check(keywords)) { - if (keywords == NULL) - PyErr_SetString(PyExc_SystemError, - "NULL received when keyword dictionary expected"); - else - PyErr_Format(PyExc_SystemError, - "%s received when keyword dictionary expected", - keywords->ob_type->tp_name); + PyErr_Format(PyExc_SystemError, + "%s received when keyword dictionary expected", + keywords->ob_type->tp_name); return 0; } kwlen = PyDict_Size(keywords); } - else { - kwlen = 0; - } /* make sure there are no duplicate values for an argument; its not clear when to use the term "keyword argument vs.
