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).
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 forsmove
andsismember
, so I suggest to convert resulthexists
tobool
as well.This shouldn't break any existing code even if someone used result of
hexists
in some sort of arithmetics becausebool
is gracefully compatible withint(1)
.