Mercurial > cpython-lru_cache-weakref
diff Objects/stringobject.c @ 26818:e094a03a80ff legacy-trunk
SF patch #659536: Use PyArg_UnpackTuple where possible.
Obtain cleaner coding and a system wide
performance boost by using the fast, pre-parsed
PyArg_Unpack function instead of PyArg_ParseTuple
function which is driven by a format string.
| author | Raymond Hettinger <python@rcn.com> |
|---|---|
| date | Sun, 29 Dec 2002 16:33:45 +0000 |
| parents | ba1578be5706 |
| children | e153961f961f |
line wrap: on
line diff
--- a/Objects/stringobject.c Sun Dec 29 05:49:09 2002 +0000 +++ b/Objects/stringobject.c Sun Dec 29 16:33:45 2002 +0000 @@ -2046,7 +2046,7 @@ int trans_table[256]; PyObject *tableobj, *delobj = NULL; - if (!PyArg_ParseTuple(args, "O|O:translate", + if (!PyArg_UnpackTuple(args, "translate", 1, 2, &tableobj, &delobj)) return NULL;
