Python client
The couchbase client for Python 0.6.0 behaves different from what the documentation states and how other Couchbase/memcached clients behave. For example, VBucketAwareCouchbaseClient.get returns a tuple (array) of 3 values on success and throws an exception ("couchbase.couchbaseclient.MemcachedError: Memcached error #1: Not found") when the key doesn't exist on the server.
I am wondering if this is because the documentation is outdated or because the client still is in Beta? Am I supposed to work around the exception or is the final version going to inherit this behavior?
To be fair, I kindof like this behavior. Throwing an exception is more Pythonic, as a dict would do the same if a key was not found. It also makes it possible to differentiate between a stored None and a missing key. On the other hand, this behavior might feel "wrong" to developers switching from other clients or environments.
Either way, I hope you guys decide whether you want to keep it and if so, please update the documentation :)
dict.get(key) returns none if key is not in dict though
bump. Seeing the same thing in 2.0 with python client 0.8.
The documentation says "If the request key does not exist in the database then the returned value is null."
but:
MemcachedError: Memcached error #1: Not found