[issue19385] dbm.dumb should be consistent when the database is closed

Serhiy Storchaka report at bugs.python.org
Fri Dec 13 22:53:26 CET 2013


Serhiy Storchaka added the comment:

> Now this seems odd, maybe catching + reraising an exception has a greater overhead than a func call and checking if an attribute is None.

Yes, of course, catching + reraising an exception is costly. But when an exception is not raised, this is cheap. Usually len() is called for open database.

> IMHO it is a bug fix, not a new feature, and could be applied in 3.3 and 3.4.

Hmm. If consider dbm.dumb as separated module, this is perhaps a new feature. But if consider it as an implementation of the dbm protocol, it should conform to other dbm modules, and this is a bugfix. What would you say Nick?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19385>
_______________________________________


More information about the Python-bugs-list mailing list