From fc1ae6c67358a1937e0bdbefd106d2c1a673182e Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 22 Jul 2014 11:11:01 +0300 Subject: [PATCH] Fixed bugs in reprs of CookieJar and multiprocessing.dummy.Value. --- Lib/cookielib.py | 4 ++-- Lib/multiprocessing/dummy/__init__.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/cookielib.py b/Lib/cookielib.py index f9c8d2f84b..f260bc57b3 100644 --- a/Lib/cookielib.py +++ b/Lib/cookielib.py @@ -1719,12 +1719,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 IOError for backwards-compatibility with Python 2.4.0 diff --git a/Lib/multiprocessing/dummy/__init__.py b/Lib/multiprocessing/dummy/__init__.py index e3b126e979..b7abde8052 100644 --- a/Lib/multiprocessing/dummy/__init__.py +++ b/Lib/multiprocessing/dummy/__init__.py @@ -138,7 +138,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__] -- 2.50.1