Message380545
Currently the signature of types.CodeType.replace() is
replace(self, /, *, co_argcount=-1, co_posonlyargcount=-1, co_kwonlyargcount=-1, co_nlocals=-1, co_stacksize=-1, co_flags=-1, co_firstlineno=-1, co_code=None, co_consts=None, co_names=None, co_varnames=None, co_freevars=None, co_cellvars=None, co_filename=None, co_name=None, co_lnotab=None)
But -1 and None are incorrect values for many parameters, and even if they would be correct, they are not default values. By default, if you do not specify some argument, the value of the corresponding attribute would not be changed.
Argument Clinic and the inspect module do not support this case. |
|
Date |
User |
Action |
Args |
2020-11-08 10:38:14 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, vstinner, larry, yselivanov |
2020-11-08 10:38:14 | serhiy.storchaka | set | messageid: <1604831894.32.0.00722269509991.issue42291@roundup.psfhosted.org> |
2020-11-08 10:38:14 | serhiy.storchaka | link | issue42291 messages |
2020-11-08 10:38:14 | serhiy.storchaka | create | |
|