Author Claudiu.Popa
Recipients Arfrever, Claudiu.Popa, ncoghlan, serhiy.storchaka
Date 2013-11-01.14:06:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1383314783.85.0.894433815263.issue19385@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-11-01 14:06:23Claudiu.Popasetrecipients: + Claudiu.Popa, ncoghlan, Arfrever, serhiy.storchaka
2013-11-01 14:06:23Claudiu.Popasetmessageid: <1383314783.85.0.894433815263.issue19385@psf.upfronthosting.co.za>
2013-11-01 14:06:23Claudiu.Popalinkissue19385 messages
2013-11-01 14:06:23Claudiu.Popacreate