Skip to content

Commit eadf7a1

Browse files
committed
review comment
1 parent a337697 commit eadf7a1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Objects/typevarobject.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2305,14 +2305,12 @@ generic_class_getitem(PyObject *cls, PyObject *args, PyObject *kwargs)
23052305
PyObject *
23062306
_Py_subscript_generic(PyThreadState* unused, PyObject *params)
23072307
{
2308-
params = unpack_typevartuples(params);
2309-
23102308
PyInterpreterState *interp = _PyInterpreterState_GET();
23112309
if (interp->cached_objects.generic_type == NULL) {
23122310
PyErr_SetString(PyExc_SystemError, "Cannot find Generic type");
2313-
Py_DECREF(params);
23142311
return NULL;
23152312
}
2313+
params = unpack_typevartuples(params);
23162314
PyObject *args[2] = {(PyObject *)interp->cached_objects.generic_type, params};
23172315
PyObject *result = call_typing_func_object("_GenericAlias", args, 2);
23182316
Py_DECREF(params);

0 commit comments

Comments
 (0)