Claudiu.Popa added the comment: Here's the new version which addresses your last comment. Regarding the first issue, I don't believe that the result will be as readable (but I agree with you that it will be better). For instance, `items` will probably look like this:
try: return [(key, self[key]) for key in self._index.keys()] except AttributeError: raise dbm.dumb.error(...) from None but will look totally different for other __len__: try: return len(self._index) except TypeError: raise dbm.dumb.error(...) from None. We could catch TypeError only for dunder methods though and for the rest of the methods check the value of _index before access. ---------- Added file: http://bugs.python.org/file32449/dbm_dumb1.patch _______________________________________ 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