[Python-checkins] cpython: #14344: fixed the repr of email.policy objects.
r.david.murray
python-checkins at python.org
Sat Mar 17 20:12:14 CET 2012
http://hg.python.org/cpython/rev/97b0cf9df420
changeset: 75798:97b0cf9df420
user: R David Murray <rdmurray at bitdance.com>
date: Sat Mar 17 15:11:59 2012 -0400
summary:
#14344: fixed the repr of email.policy objects.
files:
Lib/email/policy.py | 2 +-
Misc/NEWS | 2 ++
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Lib/email/policy.py b/Lib/email/policy.py
--- a/Lib/email/policy.py
+++ b/Lib/email/policy.py
@@ -52,7 +52,7 @@
def __repr__(self):
args = [ "{}={!r}".format(name, value)
for name, value in self.__dict__.items() ]
- return "{}({})".format(self.__class__.__name__, args if args else '')
+ return "{}({})".format(self.__class__.__name__, ', '.join(args))
def clone(self, **kw):
"""Return a new instance with specified attributes changed.
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -30,6 +30,8 @@
Library
-------
+- Issue #14344: fixed the repr of email.policy objects.
+
- Issue #11686: Added missing entries to email package __all__ lists
(mostly the new Bytes classes).
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list