mirror of
https://github.com/python/cpython.git
synced 2024-11-27 20:04:41 +08:00
Fixed bugs in reprs of CookieJar and multiprocessing.dummy.Value.
This commit is contained in:
parent
cb7d43cbdf
commit
1392df96ef
@ -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
|
||||
|
@ -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__]
|
||||
|
Loading…
Reference in New Issue
Block a user