You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Argument Clinic and the inspect module do not support this case.
That's why I used -1 and 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.
If you consider that this issue matters, you may hack the code to accept None as if no parameter was passed (pass NULL).
Activity
serhiy-storchaka commentedon Nov 8, 2020
Currently the signature of types.CodeType.replace() is
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.
vstinner commentedon Nov 9, 2020
That's why I used -1 and None.
If you consider that this issue matters, you may hack the code to accept None as if no parameter was passed (pass NULL).
pythongh-86457: Fix signature for code.replace().
gh-86457: Fix signature for code.replace() (GH-23199)
[3.12] pythongh-86457: Fix signature for code.replace() (pythonGH-23199)
[3.11] pythongh-86457: Fix signature for code.replace() (pythonGH-23199)
pythongh-86457: Add docs for Argument Clinic @text_signature directive
gh-86457: Add docs for Argument Clinic @text_signature directive (#10…
[3.11] gh-86457: Fix signature for code.replace() (GH-23199) (GH-107746)
[3.11] pythongh-86457: Add docs for Argument Clinic @text_signature d…
[3.11] gh-86457: Add docs for Argument Clinic @text_signature directi…
[3.12] gh-86457: Fix signature for code.replace() (GH-23199) (#107744)
python/cpython#86457: Add docs for Argument Clinic @text_signature di…
python/cpython#86457: Add docs for Argument Clinic @text_signature di…