diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-07-25 20:36:00 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-07-25 20:36:00 (GMT) |
commit | 465e60e654732b3a0b726d1fd82950fc982fcba2 (patch) | |
tree | 25a1567d99855ff0a2ffcdc1f7c7659f85aaaa0b /Lib/http | |
parent | 54701f303fdde38c53811776ba2d16fabf219dcc (diff) | |
download | cpython-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/http')
-rw-r--r-- | Lib/http/client.py | 3 | ||||
-rw-r--r-- | Lib/http/cookiejar.py | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/Lib/http/client.py b/Lib/http/client.py index ad5590c..57e932d 100644 --- a/Lib/http/client.py +++ b/Lib/http/client.py @@ -1334,7 +1334,8 @@ class IncompleteRead(HTTPException): e = ', %i more expected' % self.expected else: e = '' - return 'IncompleteRead(%i bytes read%s)' % (len(self.partial), e) + return '%s(%i bytes read%s)' % (self.__class__.__name__, + len(self.partial), e) def __str__(self): return repr(self) diff --git a/Lib/http/cookiejar.py b/Lib/http/cookiejar.py index 2ddd523..d563350 100644 --- a/Lib/http/cookiejar.py +++ b/Lib/http/cookiejar.py @@ -805,7 +805,7 @@ class Cookie: args.append("%s=%s" % (name, repr(attr))) args.append("rest=%s" % repr(self._rest)) args.append("rfc2109=%s" % repr(self.rfc2109)) - return "Cookie(%s)" % ", ".join(args) + return "%s(%s)" % (self.__class__.__name__, ", ".join(args)) class CookiePolicy: |