Skip to content
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

gets: Return (None, None) when key does not exist #87

Merged
merged 2 commits into from Apr 26, 2012

Conversation

pawelkowalak
Copy link
Contributor

This changes behavior of gets command to be compatible with get command.

This changes behavior of gets command to be compatible with get command.
@lericson
Copy link
Owner

Needs a test

@lericson lericson merged commit 5cfc5e1 into lericson:master Apr 26, 2012
@lericson
Copy link
Owner

This is an API change and should be documented as such, it'll be in 1.3.0 since it's pretty harmless.

Out of curiosity, does this make the usage pattern any better or is it just purely out of aesthetic preference?

@pawelkowalak
Copy link
Contributor Author

In our production system we're using libmemcached 0.49 and pylibmc from commit 16d50. That combination returned (None, None) tuple when calling gets() on non-existing key. After upgrading to pylibmc from HEAD and libmemcahced to 1.0.X we've noticed exceptions instead of (None, None). So in my opinion this change brings us back to original behavior of gets(), but I haven't investigated what caused that change.

@lericson
Copy link
Owner

Oh, okay. Should've been in 1.2.3 then, it's too far along now though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants