summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2008-03-01 04:06:19 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2008-03-01 04:06:19 (GMT)
commit3af831bacac9626b62039f7bcf777a5f1202493b (patch)
treefdeabd6c25433daa4ae9229960e6e356a7a9acd0
parentde802dc1fa57b225ec4af780e9f91edd07485ee5 (diff)
downloadcpython-3af831bacac9626b62039f7bcf777a5f1202493b.zip
cpython-3af831bacac9626b62039f7bcf777a5f1202493b.tar.gz
cpython-3af831bacac9626b62039f7bcf777a5f1202493b.tar.bz2
When the _iter_mixin stopped inheritting from UsserDictMixin, it lost the
__repr__ which caused bsddb.test.test_misc.py to fail in test03_repr_closed_db Restore the repr so the test passes. I think this is correct, but it would be good to have some more review.
-rw-r--r--Lib/bsddb/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/bsddb/__init__.py b/Lib/bsddb/__init__.py
index 939700f..b2786d3 100644
--- a/Lib/bsddb/__init__.py
+++ b/Lib/bsddb/__init__.py
@@ -170,6 +170,9 @@ class _DBWithCursor(_iter_mixin):
def __del__(self):
self.close()
+ def __repr__(self):
+ return repr(dict(self.iteritems()))
+
def _checkCursor(self):
if self.dbc is None:
self.dbc = _DeadlockWrap(self.db.cursor)