mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-122943: Remove the object converter for var-positional parameter (GH-126560)
This commit is contained in:
parent
c222441fa7
commit
06a8b0bb5e
7 changed files with 80 additions and 87 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue