-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python: adds ZSCORE command #877
Conversation
member (str): The member whose score is to be retrieved. | ||
|
||
Returns: | ||
Optional[float]: The score of the member, or None if the member does not exist in the sorted set. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description lacks that option of returning null if the key does not exist, please stick to the documentation in redis as I might have missed that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
member (str): The member whose score is to be retrieved. | ||
|
||
Commands response: | ||
Optional[float]: The score of the member, or None if the member does not exist in the sorted set. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
key = get_random_string(10) | ||
members_scores = {"one": 1, "two": 2, "three": 3} | ||
assert await redis_client.zadd(key, members_scores=members_scores) == 3 | ||
assert await redis_client.zscore(key, "one") == 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please test it with a float, not an int
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix & merge
4300e43
to
495c8f1
Compare
495c8f1
to
5c18446
Compare
No description provided.