mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
gh-110907: AC: Disallow using *
with vararg (#110908)
This commit is contained in:
parent
14d2d1576d
commit
bad7a35055
4 changed files with 26 additions and 4 deletions
|
@ -327,7 +327,6 @@ typevar.__new__ as typevar_new
|
|||
|
||||
name: object(subclass_of="&PyUnicode_Type")
|
||||
*constraints: object
|
||||
*
|
||||
bound: object = None
|
||||
covariant: bool = False
|
||||
contravariant: bool = False
|
||||
|
@ -340,7 +339,7 @@ static PyObject *
|
|||
typevar_new_impl(PyTypeObject *type, PyObject *name, PyObject *constraints,
|
||||
PyObject *bound, int covariant, int contravariant,
|
||||
int infer_variance)
|
||||
/*[clinic end generated code: output=1d200450ee99226d input=2c07ab87c94f462b]*/
|
||||
/*[clinic end generated code: output=1d200450ee99226d input=41ae33a916bfe76f]*/
|
||||
{
|
||||
if (covariant && contravariant) {
|
||||
PyErr_SetString(PyExc_ValueError,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue