Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bd53809

Browse files
committed
#14344: fixed the repr of email.policy objects.
1 parent 87b7cde commit bd53809

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Lib/email/policy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def __init__(self, **kw):
5252
def __repr__(self):
5353
args = [ "{}={!r}".format(name, value)
5454
for name, value in self.__dict__.items() ]
55-
return "{}({})".format(self.__class__.__name__, args if args else '')
55+
return "{}({})".format(self.__class__.__name__, ', '.join(args))
5656

5757
def clone(self, **kw):
5858
"""Return a new instance with specified attributes changed.

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ Core and Builtins
3030
Library
3131
-------
3232

33+
- Issue #14344: fixed the repr of email.policy objects.
34+
3335
- Issue #11686: Added missing entries to email package __all__ lists
3436
(mostly the new Bytes classes).
3537

0 commit comments

Comments
 (0)