Message201900
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. |
|
Date |
User |
Action |
Args |
2013-11-01 14:06:23 | Claudiu.Popa | set | recipients:
+ Claudiu.Popa, ncoghlan, Arfrever, serhiy.storchaka |
2013-11-01 14:06:23 | Claudiu.Popa | set | messageid: <1383314783.85.0.894433815263.issue19385@psf.upfronthosting.co.za> |
2013-11-01 14:06:23 | Claudiu.Popa | link | issue19385 messages |
2013-11-01 14:06:23 | Claudiu.Popa | create | |
|