mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #22033: Reprs of most Python implemened classes now contain actual
class name instead of hardcoded one.
This commit is contained in:
parent
54701f303f
commit
465e60e654
24 changed files with 102 additions and 74 deletions
|
@ -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)
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue