gh-122943: Remove the object converter for var-positional parameter (GH-126560)

This commit is contained in:
Serhiy Storchaka 2024-11-08 07:41:54 +02:00 committed by GitHub
parent c222441fa7
commit 06a8b0bb5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 80 additions and 87 deletions

View file

@ -651,7 +651,7 @@ typevar_alloc(PyObject *name, PyObject *bound, PyObject *evaluate_bound,
typevar.__new__ as typevar_new
name: object(subclass_of="&PyUnicode_Type")
*constraints: object
*constraints: tuple
bound: object = None
default as default_value: object(c_default="&_Py_NoDefaultStruct") = typing.NoDefault
covariant: bool = False
@ -665,7 +665,7 @@ static PyObject *
typevar_new_impl(PyTypeObject *type, PyObject *name, PyObject *constraints,
PyObject *bound, PyObject *default_value, int covariant,
int contravariant, int infer_variance)
/*[clinic end generated code: output=d2b248ff074eaab6 input=836f97f631d7293a]*/
/*[clinic end generated code: output=d2b248ff074eaab6 input=1b5b62e40c92c167]*/
{
if (covariant && contravariant) {
PyErr_SetString(PyExc_ValueError,