diff options
author | Tim Graham <timograham@gmail.com> | 2017-11-01 12:18:10 -0400 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2017-11-01 12:18:10 -0400 |
commit | 749c75d30ce8236fa4baaf474985d4dbf2cbf692 (patch) | |
tree | 623ba20a735e4964ba3a46eb52647b8307c45658 /memcache.py | |
parent | 6342d35390198753a6dd869268711c10e2a55c2c (diff) | |
download | python-memcached-749c75d30ce8236fa4baaf474985d4dbf2cbf692.tar.gz |
Fix key ordering failure in doctests
Diffstat (limited to 'memcache.py')
-rw-r--r-- | memcache.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/memcache.py b/memcache.py index 1eb43de..41ea9ca 100644 --- a/memcache.py +++ b/memcache.py @@ -834,9 +834,9 @@ class Client(threading.local): '''Sets multiple keys in the memcache doing just one query. >>> notset_keys = mc.set_multi({'key1' : 'val1', 'key2' : 'val2'}) - >>> mc.get_multi(['key1', 'key2']) == {'key1' : 'val1', - ... 'key2' : 'val2'} - 1 + >>> keys = mc.get_multi(['key1', 'key2']) + >>> keys == {'key1': 'val1', 'key2': 'val2'} + True This method is recommended over regular L{set} as it lowers @@ -856,14 +856,13 @@ class Client(threading.local): sending to memcache. Allows you to efficiently stuff these keys into a pseudo-namespace in memcache: - >> notset_keys = mc.set_multi( + >>> notset_keys = mc.set_multi( ... {'key1' : 'val1', 'key2' : 'val2'}, ... key_prefix='subspace_') >>> len(notset_keys) == 0 True - >>> mc.get_multi(['subspace_key1', - ... 'subspace_key2']) == {'subspace_key1': 'val1', - ... 'subspace_key2' : 'val2'} + >>> keys = mc.get_multi(['subspace_key1', 'subspace_key2']) + >>> keys == {'subspace_key1': 'val1', 'subspace_key2': 'val2'} True Causes key 'subspace_key1' and 'subspace_key2' to be |