Fixes issue #124 - #125
Conversation
This is what I believe the best behaviour. The get(None) doesn't throw an error, to be consistent. However I'm not sure about delete(). To be completely consistent, .delete() shouldn't throw any errors either, as the key of None doesn't exists in the database anyway. However, the Pbc client currently throws a TypeError (actually I would like it better if it didn't throw any error and just moved on). Any input?
|
@ultimatebuster Sorry for the delay reviewing this. I like the general idea of the change, but doesn't it make sense to raise an error? Maybe something more semantic? |
|
Well I think it's better to raise an error, as errors are better than silent failures. However, when I was editing this, I was looking for consistency. Since a lot of code probably do On the other hand, if we start to raise errors, we have to be consistent and change a lot of silent failures (checkable failures) into raised exceptions, which is kind of a major overhaul already (I'm looking into the option in riak-python-client2) |
|
Sure. |
This is what I believe the best behaviour. The get(None) doesn't throw
an error, to be consistent.
However I'm not sure about delete(). To be completely consistent,
.delete() shouldn't throw any errors either, as the key of None doesn't
exists in the database anyway. However, the Pbc client currently throws
a TypeError (actually I would like it better if it didn't throw any
error and just moved on). Any input?