|
36 | 36 |
|
37 | 37 | self.inst.get().Delete(key) |
38 | 38 |
|
39 | | - def Get (self, key, default = None): |
| 39 | + def get (self, key, default = None): |
40 | 40 | """Return the value for key if key is in the dictionary, else default.""" |
41 | 41 | if isinstance(key, unicode): |
42 | 42 | key = key.encode('utf-8') |
|
50 | 50 | py_result.inst = _r |
51 | 51 | return py_result |
52 | 52 |
|
| 53 | + def Get(self, *args): |
| 54 | + return call_deprecated_method("Get", "get", self.get, *args) |
| 55 | + |
53 | 56 | def __contains__(self, key): |
54 | 57 | if isinstance(key, unicode): |
55 | 58 | key = key.encode('utf-8') |
|
72 | 75 | py_result.inst = _r |
73 | 76 | return py_result |
74 | 77 |
|
75 | | - def MSet(self, list key_values ): |
| 78 | + def bulk_set(self, list key_values ): |
76 | 79 | assert isinstance(key_values, list), 'arg in_0 wrong type' |
77 | 80 | cdef shared_ptr[libcpp_vector[libcpp_pair[libcpp_utf8_string,libcpp_utf8_string]]] cpp_key_values = shared_ptr[libcpp_vector[libcpp_pair[libcpp_utf8_string,libcpp_utf8_string]]](new libcpp_vector[libcpp_pair[libcpp_utf8_string,libcpp_utf8_string]]()) |
78 | 81 | cdef libcpp_pair[libcpp_utf8_string, libcpp_utf8_string] cpp_kv |
|
92 | 95 | cpp_key_values.get().push_back(cpp_kv) |
93 | 96 |
|
94 | 97 | self.inst.get().MSet(cpp_key_values) |
| 98 | + |
| 99 | + def MSet(self, *args): |
| 100 | + return call_deprecated_method("MSet", "bulk_set", self.bulk_set, *args) |
| 101 | + |
| 102 | + def Set(self, *args): |
| 103 | + return call_deprecated_method("Set", "set", self.set, *args) |
| 104 | + |
| 105 | + def GetNear(self, *args): |
| 106 | + return call_deprecated_method("GetNear", "get_near", self.get_near, *args) |
| 107 | + |
| 108 | + def GetFuzzy(self, *args): |
| 109 | + return call_deprecated_method("GetFuzzy", "get_fuzzy", self.get_fuzzy, *args) |
| 110 | + |
| 111 | + def Delete(self, *args): |
| 112 | + return call_deprecated_method("Delete", "delete", self.delete, *args) |
| 113 | + |
| 114 | + def Flush(self, *args): |
| 115 | + return call_deprecated_method("Flush", "flush", self.flush, *args) |
0 commit comments