From 63dc548109c4f5e17280382831b93fb8e9da9207 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Thu, 22 Sep 2016 19:41:20 +0300 Subject: Issue #28086: Single var-positional argument of tuple subtype was passed unscathed to the C-defined function. Now it is converted to exact tuple. --- Python/ceval.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Python/ceval.c') diff --git a/Python/ceval.c b/Python/ceval.c index ff36d365b3..39cf33019d 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -3310,7 +3310,7 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag) } callargs = POP(); func = TOP(); - if (!PyTuple_Check(callargs)) { + if (!PyTuple_CheckExact(callargs)) { if (Py_TYPE(callargs)->tp_iter == NULL && !PySequence_Check(callargs)) { PyErr_Format(PyExc_TypeError, @@ -3327,7 +3327,7 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag) goto error; } } - assert(PyTuple_Check(callargs)); + assert(PyTuple_CheckExact(callargs)); result = do_call_core(func, callargs, kwargs); Py_DECREF(func); -- cgit v1.2.1