@@ -23,7 +23,7 @@ typedef struct {
23
23
PyObject * evaluate_bound ;
24
24
PyObject * constraints ;
25
25
PyObject * evaluate_constraints ;
26
- PyObject * default_ ;
26
+ PyObject * default_value ;
27
27
PyObject * evaluate_default ;
28
28
bool covariant ;
29
29
bool contravariant ;
@@ -33,15 +33,15 @@ typedef struct {
33
33
typedef struct {
34
34
PyObject_HEAD
35
35
PyObject * name ;
36
- PyObject * default_ ;
36
+ PyObject * default_value ;
37
37
PyObject * evaluate_default ;
38
38
} typevartupleobject ;
39
39
40
40
typedef struct {
41
41
PyObject_HEAD
42
42
PyObject * name ;
43
43
PyObject * bound ;
44
- PyObject * default_ ;
44
+ PyObject * default_value ;
45
45
PyObject * evaluate_default ;
46
46
bool covariant ;
47
47
bool contravariant ;
@@ -206,7 +206,7 @@ typevar_dealloc(PyObject *self)
206
206
Py_XDECREF (tv -> evaluate_bound );
207
207
Py_XDECREF (tv -> constraints );
208
208
Py_XDECREF (tv -> evaluate_constraints );
209
- Py_XDECREF (tv -> default_ );
209
+ Py_XDECREF (tv -> default_value );
210
210
Py_XDECREF (tv -> evaluate_default );
211
211
PyObject_ClearManagedDict (self );
212
212
PyObject_ClearWeakRefs (self );
@@ -224,7 +224,7 @@ typevar_traverse(PyObject *self, visitproc visit, void *arg)
224
224
Py_VISIT (tv -> evaluate_bound );
225
225
Py_VISIT (tv -> constraints );
226
226
Py_VISIT (tv -> evaluate_constraints );
227
- Py_VISIT (tv -> default_ );
227
+ Py_VISIT (tv -> default_value );
228
228
Py_VISIT (tv -> evaluate_default );
229
229
PyObject_VisitManagedDict (self , visit , arg );
230
230
return 0 ;
@@ -237,7 +237,7 @@ typevar_clear(typevarobject *self)
237
237
Py_CLEAR (self -> evaluate_bound );
238
238
Py_CLEAR (self -> constraints );
239
239
Py_CLEAR (self -> evaluate_constraints );
240
- Py_CLEAR (self -> default_ );
240
+ Py_CLEAR (self -> default_value );
241
241
Py_CLEAR (self -> evaluate_default );
242
242
PyObject_ClearManagedDict ((PyObject * )self );
243
243
return 0 ;
@@ -281,18 +281,18 @@ typevar_bound(typevarobject *self, void *Py_UNUSED(ignored))
2
57AE
81
281
static PyObject *
282
282
typevar_default (typevarobject * self , void * unused )
283
283
{
284
- if (self -> default_ != NULL ) {
285
- return Py_NewRef (self -> default_ );
284
+ if (self -> default_value != NULL ) {
285
+ return Py_NewRef (self -> default_value );
286
286
}
287
287
if (self -> evaluate_default == NULL ) {
288
288
Py_RETURN_NONE ;
289
289
}
290
- PyObject * default_ = PyObject_CallNoArgs (self -> evaluate_default );
291
- if (Py_IsNone (default_ )) {
292
- default_ = (PyObject * )Py_TYPE (default_ );
290
+ PyObject * default_value = PyObject_CallNoArgs (self -> evaluate_default );
291
+ if (Py_IsNone (default_value )) {
292
+ default_value = (PyObject * )Py_TYPE (default_value );
293
293
}
294
- self -> default_ = Py_XNewRef (default_ );
295
- return default_ ;
294
+ self -> default_value = Py_XNewRef (default_value );
295
+ return default_value ;
296
296
}
297
297
298
298
static PyObject *
@@ -319,7 +319,7 @@ static PyGetSetDef typevar_getset[] = {
319
319
static typevarobject *
320
320
typevar_alloc (PyObject * name , PyObject * bound , PyObject * evaluate_bound ,
321
321
PyObject * constraints , PyObject * evaluate_constraints ,
322
- PyObject * default_ ,
322
+ PyObject * default_value ,
323
323
bool covariant , bool contravariant , bool infer_variance ,
324
324
PyObject * module )
325
325
{
@@ -336,7 +336,7 @@ typevar_alloc(PyObject *name, PyObject *bound, PyObject *evaluate_bound,
336
336
tv -> evaluate_bound = Py_XNewRef (evaluate_bound );
337
337
tv -> constraints = Py_XNewRef (constraints );
338
338
tv -> evaluate_constraints = Py_XNewRef (evaluate_constraints );
339
- tv -> default_ = Py_XNewRef (default_ );
339
+ tv -> default_value = Py_XNewRef (default_value );
340
340
tv -> evaluate_default = NULL ;
341
341
342
342
tv -> covariant = covariant ;
@@ -361,7 +361,7 @@ typevar.__new__ as typevar_new
361
361
name: object(subclass_of="&PyUnicode_Type")
362
362
*constraints: object
363
363
bound: object = None
364
- default as default_ : object = NULL
364
+ default as default_value : object = NULL
365
365
covariant: bool = False
366
366
contravariant: bool = False
367
367
infer_variance: bool = False
@@ -371,7 +371,7 @@ Create a TypeVar.
371
371
372
372
static PyObject *
373
373
typevar_new_impl (PyTypeObject * type , PyObject * name , PyObject * constraints ,
374
- PyObject * bound , PyObject * default_ , int covariant ,
374
+ PyObject * bound , PyObject * default_value , int covariant ,
375
375
int contravariant , int infer_variance )
376
376
/*[clinic end generated code: output=74ee963663330604 input=2962ee79d92972fc]*/
377
377
{
@@ -417,13 +417,13 @@ typevar_new_impl(PyTypeObject *type, PyObject *name, PyObject *constraints,
417
417
Py_XDECREF (bound );
418
418
return NULL ;
419
419
}
420
- if (Py_IsNone (default_ )) {
421
- default_ = (PyObject * )Py_TYPE (default_ );
420
+ if (Py_IsNone (default_value )) {
421
+ default_value = (PyObject * )Py_TYPE (default_value );
422
422
}
423
423
424
424
PyObject * tv = (PyObject * )typevar_alloc (name , bound , NULL ,
425
425
constraints , NULL ,
426
- default_ ,
426
+ default_value ,
427
427
covariant , contravariant ,
428
428
infer_variance , module );
429
429
Py_XDECREF (bound );
@@ -844,7 +844,7 @@ paramspec_dealloc(PyObject *self)
844
844
845
845
Py_DECREF (ps -> name );
846
846
Py_XDECREF (ps -> bound );
847
- Py_XDECREF (ps -> default_ );
847
+ Py_XDECREF (ps -> default_value );
848
848
Py_XDECREF (ps -> evaluate_default );
849
849
PyObject_ClearManagedDict (self );
850
850
PyObject_ClearWeakRefs (self );
@@ -859,7 +859,7 @@ paramspec_traverse(PyObject *self, visitproc visit, void *arg)
859
859
Py_VISIT (Py_TYPE (self ));
860
860
paramspecobject * ps = (paramspecobject * )self ;
861
861
Py_VISIT (ps -> bound );
862
- Py_VISIT (ps -> default_ );
862
+ Py_VISIT (ps -> default_value );
863
863
Py_VISIT (ps -> evaluate_default );
864
864
PyObject_VisitManagedDict (self , visit , arg );
865
865
return 0 ;
@@ -869,7 +869,7 @@ static int
869
869
paramspec_clear (paramspecobject * self )
870
870
{
871
871
Py_CLEAR (self -> bound );
872
- Py_CLEAR (self -> default_ );
872
+ Py_CLEAR (self -> default_value );
873
873
Py_CLEAR (self -> evaluate_default );
874
874
PyObject_ClearManagedDict ((PyObject * )self );
875
875
return 0 ;
@@ -914,18 +914,18 @@ paramspec_kwargs(PyObject *self, void *unused)
914
914
static PyObject *
915
915
paramspec_default (paramspecobject * self , void * unused )
916
916
{
917
- if (self -> default_ != NULL ) {
918
- return Py_NewRef (self -> default_ );
917
+ if (self -> default_value != NULL ) {
918
+ return Py_NewRef (self -> default_value );
919
919
}
920
920
if (self -> evaluate_default == NULL ) {
921
921
Py_RETURN_NONE ;
922
922
}
923
- PyObject * default_ = PyObject_CallNoArgs (self -> evaluate_default );
924
- if (Py_IsNone (default_ )) {
925
- default_ = (PyObject * )Py_TYPE (default_ );
923
+ PyObject * default_value = PyObject_CallNoArgs (self -> evaluate_default );
924
+ if (Py_IsNone (default_value )) {
925
+ default_value = (PyObject * )Py_TYPE (default_value );
926
926
}
927
- self -> default_ = Py_XNewRef (default_ );
928
- return default_ ;
927
+ self -> default_value = Py_XNewRef (default_value );
928
+ return default_value ;
929
929
}
930
930
931
931
static PyGetSetDef paramspec_getset [] = {
@@ -936,7 +936,7 @@ static PyGetSetDef paramspec_getset[] = {
936
936
};
937
937
938
938
static paramspecobject *
939
- paramspec_alloc (PyObject * name , PyObject * bound , PyObject * default_ , bool covariant ,
939
+ paramspec_alloc (PyObject * name , PyObject * bound , PyObject * default_value , bool covariant ,
940
940
bool contravariant , bool infer_variance , PyObject * module )
941
941
{
942
942
PyTypeObject * tp = _PyInterpreterState_GET ()-> cached_objects .paramspec_type ;
@@ -949,7 +949,7 @@ paramspec_alloc(PyObject *name, PyObject *bound, PyObject *default_, bool covari
949
949
ps -> covariant = covariant ;
950
950
ps -> contravariant = contravariant ;
951
951
ps -> infer_variance = infer_variance ;
952
- ps -> default_ = Py_XNewRef (default_ );
952
+ ps -> default_value = Py_XNewRef (default_value );
953
953
ps -> evaluate_default = NULL ;
954
954
_PyObject_GC_TRACK (ps );
955
955
if (module != NULL ) {
@@ -968,7 +968,7 @@ paramspec.__new__ as paramspec_new
968
968
name: object(subclass_of="&PyUnicode_Type")
969
969
*
970
970
bound: object = None
971
- default as default_ : object = NULL
971
+ default as default_value : object = NULL
972
972
covariant: bool = False
973
973
contravariant: bool = False
974
974
infer_variance: bool = False
@@ -978,7 +978,7 @@ Create a ParamSpec object.
978
978
979
979
static PyObject *
980
980
paramspec_new_impl (PyTypeObject * type , PyObject * name , PyObject * bound ,
981
- PyObject * default_ , int covariant , int contravariant ,
981
+ PyObject * default_value , int covariant , int contravariant ,
982
982
int infer_variance )
983
983
/*[clinic end generated code: output=b6be5856624d7b5d input=5f16268ae6237a50]*/
984
984
{
@@ -1001,11 +1001,11 @@ paramspec_new_impl(PyTypeObject *type, PyObject *name, PyObject *bound,
1001
1001
Py_XDECREF (bound );
1002
1002
return NULL ;
1003
1003
}
1004
- if (Py_IsNone (default_ )) {
1005
- default_ = (PyObject * )Py_TYPE (default_ );
1004
+ if (Py_IsNone (default_value )) {
1005
+ default_value = (PyObject * )Py_TYPE (default_value );
1006
1006
}
1007
1007
PyObject * ps = (PyObject * )paramspec_alloc (
1008
- name , bound , default_ , covariant , contravariant , infer_variance , module );
1008
+ name , bound , default_value , covariant , contravariant , infer_variance , module );
1009
1009
Py_XDECREF (bound );
1010
1010
Py_DECREF (module );
1011
1011
return ps ;
@@ -1164,7 +1164,7 @@ typevartuple_dealloc(PyObject *self)
1164
1164
typevartupleobject * tvt = (typevartupleobject * )self ;
1165
1165
1166
1166
Py_DECREF (tvt -> name );
1167
- Py_XDECREF (tvt -> default_ );
1167
+ Py_XDECREF (tvt -> default_value );
1168
1168
Py_XDECREF (tvt -> evaluate_default );
1169
1169
PyObject_ClearManagedDict (self );
1170
1170
PyObject_ClearWeakRefs (self );
@@ -1205,15 +1205,15 @@ static PyMemberDef typevartuple_members[] = {
1205
1205
};
1206
1206
1207
1207
static typevartupleobject *
1208
- typevartuple_alloc (PyObject * name , PyObject * module , PyObject * default_ )
1208
+ typevartuple_alloc (PyObject * name , PyObject * module , PyObject * default_value )
1209
1209
{
1210
1210
PyTypeObject * tp = _PyInterpreterState_GET ()-> cached_objects .typevartuple_type ;
1211
1211
typevartupleobject * tvt = PyObject_GC_New (typevartupleobject , tp );
1212
1212
if (tvt == NULL ) {
1213
1213
return NULL ;
1214
1214
}
1215
1215
tvt -> name = Py_NewRef (name );
1216
- tvt -> default_ = Py_XNewRef (default_ );
1216
+ tvt -> default_value = Py_XNewRef (default_value );
1217
1217
tvt -> evaluate_default = NULL ;
1218
1218
_PyObject_GC_TRACK (tvt );
1219
1219
if (module != NULL ) {
@@ -1231,23 +1231,23 @@ typevartuple.__new__
1231
1231
1232
1232
name: object(subclass_of="&PyUnicode_Type")
1233
1233
*
1234
- default as default_ : object = NULL
1234
+ default as default_value : object = NULL
1235
1235
1236
1236
Create a new TypeVarTuple with the given name.
1237
1237
[clinic start generated code]*/
1238
1238
1239
1239
static PyObject *
1240
- typevartuple_impl (PyTypeObject * type , PyObject * name , PyObject * default_ )
1240
+ typevartuple_impl (PyTypeObject * type , PyObject * name , PyObject * default_value )
1241
1241
/*[clinic end generated code: output=eb847fe0acd69560 input=b2f0ecf512371a75]*/
1242
1242
{
1243
1243
PyObject * module = caller ();
1244
1244
if (module == NULL ) {
1245
1245
return NULL ;
1246
1246
}
1247
- if (Py_IsNone (default_ )) {
1248
- default_ = (PyObject * )Py_TYPE (default_ );
1247
+ if (Py_IsNone (default_value )) {
1248
+ default_value = (PyObject * )Py_TYPE (default_value );
1249
1249
}
1250
- PyObject * result = (PyObject * )typevartuple_alloc (name , module , default_ );
1250
+ PyObject * result = (PyObject * )typevartuple_alloc (name , module , default_value );
1251
1251
Py_DECREF (module );
1252
1252
return result ;
1253
1253
}
@@ -1312,7 +1312,7 @@ static int
1312
1312
typevartuple_traverse (PyObject * self , visitproc visit , void * arg )
1313
1313
{
1314
1314
Py_VISIT (Py_TYPE (self ));
1315
- Py_VISIT (((typevartupleobject * )self )-> default_ );
1315
+ Py_VISIT (((typevartupleobject * )self )-> default_value );
1316
1316
Py_VISIT (((typevartupleobject * )self )-> evaluate_default );
1317
1317
PyObject_VisitManagedDict (self , visit , arg );
1318
1318
return 0 ;
@@ -1321,7 +1321,7 @@ typevartuple_traverse(PyObject *self, visitproc visit, void *arg)
1321
1321
static int
1322
1322
typevartuple_clear (PyObject * self )
1323
1323
{
1324
- Py_CLEAR (((typevartupleobject * )self )-> default_ );
1324
+ Py_CLEAR (((typevartupleobject * )self )-> default_value );
1325
1325
Py_CLEAR (((typevartupleobject * )self )-> evaluate_default );
1326
1326
PyObject_ClearManagedDict (self );
1327
1327
return 0 ;
@@ -1330,18 +1330,18 @@ typevartuple_clear(PyObject *self)
1330
1330
static PyObject *
1331
1331
typevartuple_default (typevartupleobject * self , void * unused )
1332
1332
{
1333
- if (self -> default_ != NULL ) {
1334
- return Py_NewRef (self -> default_ );
1333
+ if (self -> default_value != NULL ) {
1334
+ return Py_NewRef (self -> default_value );
1335
1335
}
1336
1336
if (self -> evaluate_default == NULL ) {
1337
1337
Py_RETURN_NONE ;
1338
1338
}
1339
- PyObject * default_ = PyObject_CallNoArgs (self -> evaluate_default );
1340
- if (Py_IsNone (default_ )) {
1341
- default_ = (PyObject * )Py_TYPE (default_ );
1339
+ PyObject * default_value = PyObject_CallNoArgs (self -> evaluate_default );
1340
+ if (Py_IsNone (default_value )) {
1341
+ default_value = (PyObject * )Py_TYPE (default_value );
1342
1342
}
1343
- self -> default_ = Py_XNewRef (default_ );
1344
- return default_ ;
1343
+ self -> default_value = Py_XNewRef (default_value );
1344
+ return default_value ;
1345
1345
}
1346
1346
1347
1347
static PyGetSetDef typevartuple_getset [] = {
0 commit comments