New submission from Claudiu.Popa: This problem occurred in issue19282. Basicly, dbm.dumb is not consistent with dbm.gnu and dbm.ndbm when the database is closed, as seen in the following:
>>> import dbm.dumb as d >>> db = d.open('test.dat', 'c') >>> db.close() >>> db.keys() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/tank/libs/cpython/Lib/dbm/dumb.py", line 212, in keys return list(self._index.keys()) AttributeError: 'NoneType' object has no attribute 'keys' >>> vs >>> import dbm.gnu as g >>> db = g.open('test.dat', 'c') >>> db.close() >>> db.keys() Traceback (most recent call last): File "<stdin>", line 1, in <module> _gdbm.error: GDBM object has already been closed >>> Attaching a patch. ---------- components: Library (Lib) messages: 201209 nosy: Claudiu.Popa priority: normal severity: normal status: open title: dbm.dumb should be consistent when the database is closed type: enhancement versions: Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19385> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com