You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's just say an int of 0 or a float of 0.0 is an empty list/tuple/dict/set, an empty string or byte, a None (or in this case 0) are all falsey in Python, meaning they ultimately are all going to be evaluated as false.
This rule is fairly general. None, 0, [], {}, empty containers in general, etc., are all "falsey", while anything else is "truthy".
In [6]: bool(None)
Out[6]: FalseIn [7]: bool([])
Out[7]: False
https://github.com/percolate/redset/blob/master/redset/locks.py#L60
Because self.timeout is evaluated as
timeout or 10
, if timeout is passed in as 0, 0 is a false-y value, and incorrectly gets set to 10.The text was updated successfully, but these errors were encountered: