[Python-checkins] cpython (merge 3.4 -> default): Issue #21629: Merge from 3.4.
larry.hastings
python-checkins at python.org
Wed Jun 11 13:35:37 CEST 2014
http://hg.python.org/cpython/rev/8b4b8f5d7321
changeset: 91128:8b4b8f5d7321
parent: 91126:149cc6364180
parent: 91127:6b2db7fc17f7
user: Larry Hastings <larry at hastings.org>
date: Wed Jun 11 04:36:09 2014 -0700
summary:
Issue #21629: Merge from 3.4.
files:
Misc/NEWS | 2 ++
Tools/clinic/clinic.py | 4 +---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -623,6 +623,8 @@
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
--- a/Tools/clinic/clinic.py
+++ b/Tools/clinic/clinic.py
@@ -2044,11 +2044,9 @@
# 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):
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list