summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-03-17 19:11:59 (GMT)
committerR David Murray <rdmurray@bitdance.com>2012-03-17 19:11:59 (GMT)
commitbd53809ee7776287370d4219eec8f8d1dccae49d (patch)
tree5ad9e4e7390692f98c2bff0f18bbc1126dd041a4
parent87b7cdea965049760ddc5af03fe157e81bedd633 (diff)
downloadcpython-bd53809ee7776287370d4219eec8f8d1dccae49d.zip
cpython-bd53809ee7776287370d4219eec8f8d1dccae49d.tar.gz
cpython-bd53809ee7776287370d4219eec8f8d1dccae49d.tar.bz2
#14344: fixed the repr of email.policy objects.
-rw-r--r--Lib/email/policy.py2
-rw-r--r--Misc/NEWS2
2 files changed, 3 insertions, 1 deletions
diff --git a/Lib/email/policy.py b/Lib/email/policy.py
index 88877a2..585a752 100644
--- a/Lib/email/policy.py
+++ b/Lib/email/policy.py
@@ -52,7 +52,7 @@ class _PolicyBase:
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
index 4c6a5c2..93fb4bd 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -30,6 +30,8 @@ Core and Builtins
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).