Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
review comment
  • Loading branch information
eendebakpt committed Mar 6, 2026
commit eadf7a18b13842bc4168f6bae05bd4450247d315
4 changes: 1 addition & 3 deletions Objects/typevarobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -2305,14 +2305,12 @@ generic_class_getitem(PyObject *cls, PyObject *args, PyObject *kwargs)
PyObject *
_Py_subscript_generic(PyThreadState* unused, PyObject *params)
{
params = unpack_typevartuples(params);

PyInterpreterState *interp = _PyInterpreterState_GET();
if (interp->cached_objects.generic_type == NULL) {
PyErr_SetString(PyExc_SystemError, "Cannot find Generic type");
Py_DECREF(params);
return NULL;
}
params = unpack_typevartuples(params);
PyObject *args[2] = {(PyObject *)interp->cached_objects.generic_type, params};
PyObject *result = call_typing_func_object("_GenericAlias", args, 2);
Py_DECREF(params);
Expand Down
Loading