diff options
author | Larry Hastings <larry@hastings.org> | 2014-06-11 04:31:29 -0700 |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2014-06-11 04:31:29 -0700 |
commit | a5baed12916488b893850f2d7eb05536a844bef1 (patch) | |
tree | fb871da12428bbdde788076fafd82e4453214e8a /Tools/clinic | |
parent | 1674f1785689afca296eb9915b7a655e33aa1305 (diff) | |
download | cpython-a5baed12916488b893850f2d7eb05536a844bef1.tar.gz |
Issue #21629: Fix Argument Clinic's "--converters" feature.
Diffstat (limited to 'Tools/clinic')
-rwxr-xr-x | Tools/clinic/clinic.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py index 68a14361fd..93e8f5a6b9 100755 --- a/Tools/clinic/clinic.py +++ b/Tools/clinic/clinic.py @@ -2044,11 +2044,9 @@ def add_default_legacy_c_converter(cls): # automatically add converter for default format unit # (but without stomping on the existing one if it's already # set, in case you subclass) - if ((cls.format_unit != 'O&') and + if ((cls.format_unit not in ('O&', '')) and (cls.format_unit not in legacy_converters)): legacy_converters[cls.format_unit] = cls - if cls.format_unit: - legacy_converters[cls.format_unit] = cls return cls def add_legacy_c_converter(format_unit, **kwargs): |