From: R David Murray Date: Sat, 17 Mar 2012 19:11:59 +0000 (-0400) Subject: #14344: fixed the repr of email.policy objects. X-Git-Tag: v3.3.0a2~118 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bd53809ee7776287370d4219eec8f8d1dccae49d;p=python #14344: fixed the repr of email.policy objects. --- diff --git a/Lib/email/policy.py b/Lib/email/policy.py index 88877a2f45..585a752819 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 4c6a5c2023..93fb4bd5d9 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).