Mercurial > cpython-lru_cache-weakref
diff Python/bltinmodule.c @ 2824:65c7105868f8 legacy-trunk
rename arglist to alist (conflict with new grammar symbol)
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Mon, 10 Jul 1995 13:52:21 +0000 |
| parents | 9318ac51691e |
| children | 0261bf5b3819 |
line wrap: on
line diff
--- a/Python/bltinmodule.c Mon Jul 10 11:58:31 1995 +0000 +++ b/Python/bltinmodule.c Mon Jul 10 13:52:21 1995 +0000 @@ -80,15 +80,15 @@ object *self; object *args; { - object *func, *arglist; + object *func, *alist; - if (!newgetargs(args, "OO:apply", &func, &arglist)) + if (!newgetargs(args, "OO:apply", &func, &alist)) return NULL; - if (!is_tupleobject(arglist)) { + if (!is_tupleobject(alist)) { err_setstr(TypeError, "apply() 2nd argument must be tuple"); return NULL; } - return call_object(func, arglist); + return call_object(func, alist); } static object * @@ -566,13 +566,13 @@ /* XXX Special case map(None, single_list) could be more efficient */ for (i = 0; ; ++i) { - object *arglist, *item, *value; + object *alist, *item, *value; int any = 0; if (func == None && n == 1) - arglist = NULL; + alist = NULL; else { - if ((arglist = newtupleobject(n)) == NULL) + if ((alist = newtupleobject(n)) == NULL) goto Fail_1; } @@ -600,32 +600,32 @@ any = 1; } - if (!arglist) + if (!alist) break; - if (settupleitem(arglist, j, item) < 0) { + if (settupleitem(alist, j, item) < 0) { DECREF(item); goto Fail_0; } continue; Fail_0: - XDECREF(arglist); + XDECREF(alist); goto Fail_1; } - if (!arglist) - arglist = item; + if (!alist) + alist = item; if (!any) { - DECREF(arglist); + DECREF(alist); break; } if (func == None) - value = arglist; + value = alist; else { - value = call_object(func, arglist); - DECREF(arglist); + value = call_object(func, alist); + DECREF(alist); if (value == NULL) goto Fail_1; }
