mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Issue #20299: Argument Clinic custom converters may now change the default
value of c_default and py_default with a class member.
This commit is contained in:
parent
dc3cce077d
commit
b470575e24
2 changed files with 7 additions and 2 deletions
|
@ -101,6 +101,9 @@ Tests
|
||||||
Tools/Demos
|
Tools/Demos
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
|
- Issue #20299: Argument Clinic custom converters may now change the default
|
||||||
|
value of c_default and py_default with a class member.
|
||||||
|
|
||||||
- Issue #20287: Argument Clinic's output is now configurable, allowing
|
- Issue #20287: Argument Clinic's output is now configurable, allowing
|
||||||
delaying its output or even redirecting it to a separate file.
|
delaying its output or even redirecting it to a separate file.
|
||||||
|
|
||||||
|
|
|
@ -1893,8 +1893,10 @@ class CConverter(metaclass=CConverterAutoRegister):
|
||||||
self.__class__.__name__, default, name, types_str))
|
self.__class__.__name__, default, name, types_str))
|
||||||
self.default = default
|
self.default = default
|
||||||
|
|
||||||
self.c_default = c_default
|
if c_default:
|
||||||
self.py_default = py_default
|
self.c_default = c_default
|
||||||
|
if py_default:
|
||||||
|
self.py_default = py_default
|
||||||
|
|
||||||
if annotation != unspecified:
|
if annotation != unspecified:
|
||||||
fail("The 'annotation' parameter is not currently permitted.")
|
fail("The 'annotation' parameter is not currently permitted.")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue