unscathed to the C-defined function. Now it is converted to exact tuple.
ret = get_args(*TupleSubclass([1, 2]))
self.assertEqual(ret, (1, 2))
- self.assertIsInstance(ret, tuple)
+ self.assertIs(type(ret), tuple)
ret = get_args()
self.assertIn(ret, ((), None))
Core and Builtins
-----------------
+- Issue #28086: Single var-positional argument of tuple subtype was passed
+ unscathed to the C-defined function. Now it is converted to exact tuple.
+
- Issue #28214: Now __set_name__ is looked up on the class instead of the
instance.
}
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,
goto error;
}
}
- assert(PyTuple_Check(callargs));
+ assert(PyTuple_CheckExact(callargs));
result = do_call_core(func, callargs, kwargs);
Py_DECREF(func);