Kaydet (Commit) f4331c1c authored tarafından Tim Peters's avatar Tim Peters

vgetargskeywords(): remove test that can't succeed. Not a bugfix, just

removing useless obfuscation.
üst 9fda73cd
...@@ -1028,9 +1028,9 @@ vgetargskeywords(PyObject *args, PyObject *keywords, char *format, ...@@ -1028,9 +1028,9 @@ vgetargskeywords(PyObject *args, PyObject *keywords, char *format,
char *msg, *ks, **p; char *msg, *ks, **p;
int nkwds, pos, match, converted; int nkwds, pos, match, converted;
PyObject *key, *value; PyObject *key, *value;
/* nested tuples cannot be parsed when using keyword arguments */ /* nested tuples cannot be parsed when using keyword arguments */
for (;;) { for (;;) {
int c = *format++; int c = *format++;
if (c == '(') { if (c == '(') {
...@@ -1068,23 +1068,17 @@ vgetargskeywords(PyObject *args, PyObject *keywords, char *format, ...@@ -1068,23 +1068,17 @@ vgetargskeywords(PyObject *args, PyObject *keywords, char *format,
tplen = PyTuple_GET_SIZE(args); tplen = PyTuple_GET_SIZE(args);
/* do a cursory check of the keywords just to see how many we got */ /* do a cursory check of the keywords just to see how many we got */
kwlen = 0;
if (keywords) { if (keywords) {
if (!PyDict_Check(keywords)) { if (!PyDict_Check(keywords)) {
if (keywords == NULL) PyErr_Format(PyExc_SystemError,
PyErr_SetString(PyExc_SystemError, "%s received when keyword dictionary expected",
"NULL received when keyword dictionary expected"); keywords->ob_type->tp_name);
else
PyErr_Format(PyExc_SystemError,
"%s received when keyword dictionary expected",
keywords->ob_type->tp_name);
return 0; return 0;
} }
kwlen = PyDict_Size(keywords); kwlen = PyDict_Size(keywords);
} }
else {
kwlen = 0;
}
/* make sure there are no duplicate values for an argument; /* make sure there are no duplicate values for an argument;
its not clear when to use the term "keyword argument vs. its not clear when to use the term "keyword argument vs.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment