summaryrefslogtreecommitdiffstats
path: root/Lib/email
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-07-25 20:36:00 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-07-25 20:36:00 (GMT)
commit465e60e654732b3a0b726d1fd82950fc982fcba2 (patch)
tree25a1567d99855ff0a2ffcdc1f7c7659f85aaaa0b /Lib/email
parent54701f303fdde38c53811776ba2d16fabf219dcc (diff)
downloadcpython-465e60e654732b3a0b726d1fd82950fc982fcba2.zip
cpython-465e60e654732b3a0b726d1fd82950fc982fcba2.tar.gz
cpython-465e60e654732b3a0b726d1fd82950fc982fcba2.tar.bz2
Issue #22033: Reprs of most Python implemened classes now contain actual
class name instead of hardcoded one.
Diffstat (limited to 'Lib/email')
-rw-r--r--Lib/email/headerregistry.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/email/headerregistry.py b/Lib/email/headerregistry.py
index 1fae950..2bdae6c 100644
--- a/Lib/email/headerregistry.py
+++ b/Lib/email/headerregistry.py
@@ -80,7 +80,8 @@ class Address:
return lp
def __repr__(self):
- return "Address(display_name={!r}, username={!r}, domain={!r})".format(
+ return "{}(display_name={!r}, username={!r}, domain={!r})".format(
+ self.__class__.__name__,
self.display_name, self.username, self.domain)
def __str__(self):
@@ -131,7 +132,8 @@ class Group:
return self._addresses
def __repr__(self):
- return "Group(display_name={!r}, addresses={!r}".format(
+ return "{}(display_name={!r}, addresses={!r}".format(
+ self.__class__.__name__,
self.display_name, self.addresses)
def __str__(self):