@@ -876,13 +876,9 @@ BaseExceptionGroup_str(PyBaseExceptionGroupObject *self)
876
876
}
877
877
878
878
static PyObject *
879
- BaseExceptionGroup_derive (PyObject * self_ , PyObject * args )
879
+ BaseExceptionGroup_derive (PyObject * self_ , PyObject * excs )
880
880
{
881
881
PyBaseExceptionGroupObject * self = _PyBaseExceptionGroupObject_cast (self_ );
882
- PyObject * excs = NULL ;
883
- if (!PyArg_ParseTuple (args , "O" , & excs )) {
884
- return NULL ;
885
- }
886
882
PyObject * init_args = PyTuple_Pack (2 , self -> msg , excs );
887
883
if (!init_args ) {
888
884
return NULL ;
@@ -1176,13 +1172,8 @@ exceptiongroup_split_recursive(PyObject *exc,
1176
1172
}
1177
1173
1178
1174
static PyObject *
1179
- BaseExceptionGroup_split (PyObject * self , PyObject * args )
1175
+ BaseExceptionGroup_split (PyObject * self , PyObject * matcher_value )
1180
1176
{
1181
- PyObject * matcher_value = NULL ;
1182
- if (!PyArg_UnpackTuple (args , "split" , 1 , 1 , & matcher_value )) {
1183
- return NULL ;
1184
- }
1185
-
1186
1177
_exceptiongroup_split_matcher_type matcher_type ;
1187
1178
if (get_matcher_type (matcher_value , & matcher_type ) < 0 ) {
1188
1179
return NULL ;
@@ -1207,13 +1198,8 @@ BaseExceptionGroup_split(PyObject *self, PyObject *args)
1207
1198
}
1208
1199
1209
1200
static PyObject *
1210
- BaseExceptionGroup_subgroup (PyObject * self , PyObject * args )
1201
+ BaseExceptionGroup_subgroup (PyObject * self , PyObject * matcher_value )
1211
1202
{
1212
- PyObject * matcher_value = NULL ;
1213
- if (!PyArg_UnpackTuple (args , "subgroup" , 1 , 1 , & matcher_value )) {
1214
- return NULL ;
1215
- }
1216
-
1217
1203
_exceptiongroup_split_matcher_type matcher_type ;
1218
1204
if (get_matcher_type (matcher_value , & matcher_type ) < 0 ) {
1219
1205
return NULL ;
@@ -1488,9 +1474,9 @@ static PyMemberDef BaseExceptionGroup_members[] = {
1488
1474
static PyMethodDef BaseExceptionGroup_methods [] = {
1489
1475
{"__class_getitem__" , (PyCFunction )Py_GenericAlias ,
1490
1476
METH_O |METH_CLASS , PyDoc_STR ("See PEP 585" )},
1491
- {"derive" , (PyCFunction )BaseExceptionGroup_derive , METH_VARARGS },
1492
- {"split" , (PyCFunction )BaseExceptionGroup_split , METH_VARARGS },
1493
- {"subgroup" , (PyCFunction )BaseExceptionGroup_subgroup , METH_VARARGS },
1477
+ {"derive" , (PyCFunction )BaseExceptionGroup_derive , METH_O },
1478
+ {"split" , (PyCFunction )BaseExceptionGroup_split , METH_O },
1479
+ {"subgroup" , (PyCFunction )BaseExceptionGroup_subgroup , METH_O },
1494
1480
{NULL }
1495
1481
};
1496
1482
0 commit comments