diff options
author | Larry Hastings <larry@hastings.org> | 2014-01-19 05:54:15 (GMT) |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2014-01-19 05:54:15 (GMT) |
commit | b470575e2492349584d9afa2a9d581b58ee92c38 (patch) | |
tree | cfd3e51b261f2a6b0f89d98b9c2687831ed71016 /Tools/clinic | |
parent | dc3cce077d31b613bee8bc07d9c97bf63a2304f3 (diff) | |
download | cpython-b470575e2492349584d9afa2a9d581b58ee92c38.zip cpython-b470575e2492349584d9afa2a9d581b58ee92c38.tar.gz cpython-b470575e2492349584d9afa2a9d581b58ee92c38.tar.bz2 |
Issue #20299: Argument Clinic custom converters may now change the default
value of c_default and py_default with a class member.
Diffstat (limited to 'Tools/clinic')
-rwxr-xr-x | Tools/clinic/clinic.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py index 0987d56..ba0bc17 100755 --- a/Tools/clinic/clinic.py +++ b/Tools/clinic/clinic.py @@ -1893,8 +1893,10 @@ class CConverter(metaclass=CConverterAutoRegister): self.__class__.__name__, default, name, types_str)) self.default = default - self.c_default = c_default - self.py_default = py_default + if c_default: + self.c_default = c_default + if py_default: + self.py_default = py_default if annotation != unspecified: fail("The 'annotation' parameter is not currently permitted.") |