diff -r ee9921b29fd8 Python/ceval.c --- a/Python/ceval.c Mon Apr 18 21:21:10 2016 +0300 +++ b/Python/ceval.c Tue Apr 19 12:13:49 2016 -0400 @@ -4890,6 +4890,21 @@ { PyObject *callargs, *w; + if (!nstack) { + if (!stararg) { + /* There are no positional arguments on the stack and there is no + sequence to be unpacked. */ + return PyTuple_New(0); + } + if (PyTuple_CheckExact(stararg)) { + /* No arguments are passed on the stack and the sequence is not a + tuple subclass so we can just pass the stararg tuple directly + to the function. */ + Py_INCREF(stararg); + return stararg; + } + } + callargs = PyTuple_New(nstack + nstar); if (callargs == NULL) { return NULL;