diff options
author | Larry Hastings <larry@hastings.org> | 2014-06-11 04:36:09 -0700 |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2014-06-11 04:36:09 -0700 |
commit | d9d7567eacd2e8340da0470fe74ce8dae2e00f9b (patch) | |
tree | b3bbceef3d17e9a3756169e72d31897cc971e695 | |
parent | 99537627fd11d4ebf7379cbb732ba616d15bb4a4 (diff) | |
parent | f150378ef02081bdebf40d33ee2d9b286763b346 (diff) | |
download | cpython-git-d9d7567eacd2e8340da0470fe74ce8dae2e00f9b.tar.gz |
Issue #21629: Merge from 3.4.
-rw-r--r-- | Misc/NEWS | 2 | ||||
-rwxr-xr-x | Tools/clinic/clinic.py | 4 |
2 files changed, 3 insertions, 3 deletions
@@ -623,6 +623,8 @@ Tests Tools/Demos ----------- +- Issue #21629: Fix Argument Clinic's "--converters" feature. + - Add support for ``yield from`` to 2to3. - Add support for the PEP 465 matrix multiplication operator to 2to3. 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): |