diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-10-27 00:17:34 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-10-27 00:17:34 (GMT) |
commit | f4331c1c3874651cfa872c9dda8ab504e0129349 (patch) | |
tree | 365c613e2ba4029dd2c24d83a991199228a58059 | |
parent | 9fda73cdd13d1fcd6aace395481cef3d7c94e5c1 (diff) | |
download | cpython-f4331c1c3874651cfa872c9dda8ab504e0129349.zip cpython-f4331c1c3874651cfa872c9dda8ab504e0129349.tar.gz cpython-f4331c1c3874651cfa872c9dda8ab504e0129349.tar.bz2 |
vgetargskeywords(): remove test that can't succeed. Not a bugfix, just
removing useless obfuscation.
-rw-r--r-- | Python/getargs.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/Python/getargs.c b/Python/getargs.c index 6593a82..557389b 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -1028,9 +1028,9 @@ vgetargskeywords(PyObject *args, PyObject *keywords, char *format, 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 @@ vgetargskeywords(PyObject *args, PyObject *keywords, char *format, 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. |