IlyaSkriblovsky / txredisapi

non-blocking redis client for python twisted
Apache License 2.0
235 stars 91 forks source link

Make `hexists` to return bool #104

Closed IlyaSkriblovsky closed 8 years ago

IlyaSkriblovsky commented 8 years ago

Redis doesn't have distinct boolean data type, so its boolean queries return integer 1/0. But we in python do have one and it makes sense to return bool where appropriate. This is already done for smove and sismember, so I suggest to convert result hexists to bool as well.

This shouldn't break any existing code even if someone used result of hexists in some sort of arithmetics because bool is gracefully compatible with int(1).