From: Serhiy Storchaka Date: Tue, 22 Jul 2014 08:09:36 +0000 (+0300) Subject: Fixed bugs in reprs of CookieJar and multiprocessing.dummy.Value. X-Git-Tag: v3.4.2rc1~194 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1392df96efdccc7ed369fe0ab8e55bf4e9c9e0c4;p=python Fixed bugs in reprs of CookieJar and multiprocessing.dummy.Value. --- diff --git a/Lib/http/cookiejar.py b/Lib/http/cookiejar.py index 4dc468bacc..2ddd523bba 100644 --- a/Lib/http/cookiejar.py +++ b/Lib/http/cookiejar.py @@ -1722,12 +1722,12 @@ class CookieJar: def __repr__(self): r = [] for cookie in self: r.append(repr(cookie)) - return "<%s[%s]>" % (self.__class__, ", ".join(r)) + return "<%s[%s]>" % (self.__class__.__name__, ", ".join(r)) def __str__(self): r = [] for cookie in self: r.append(str(cookie)) - return "<%s[%s]>" % (self.__class__, ", ".join(r)) + return "<%s[%s]>" % (self.__class__.__name__, ", ".join(r)) # derives from OSError for backwards-compatibility with Python 2.4.0 diff --git a/Lib/multiprocessing/dummy/__init__.py b/Lib/multiprocessing/dummy/__init__.py index 97f7af737e..135db7f77f 100644 --- a/Lib/multiprocessing/dummy/__init__.py +++ b/Lib/multiprocessing/dummy/__init__.py @@ -104,7 +104,7 @@ class Value(object): self._value = value value = property(_get, _set) def __repr__(self): - return '<%r(%r, %r)>'%(type(self).__name__,self._typecode,self._value) + return '<%s(%r, %r)>'%(type(self).__name__,self._typecode,self._value) def Manager(): return sys.modules[__name__]