def set(self, key, value):
"""Set the value at key ``key`` to ``value``
>>> dc = Dictator()
>>> dc['s0'] = 'string value'
>>> dc['s0']
'string value'
>>> dc.set('l0', ['abc', 123])
>>> dc['l0']
['abc', '123']
>>> dc.set([1, 2, 3], ['a', 'b'])
>>> dc['[1, 2, 3]']
['a', 'b']
>>> dc.clear()
:param key: any value (will be converted to string in Redis)
:type key: Any
:param value: Any
:return: None
:rtype None
"""
self.__setitem__(key, value)
评论列表
文章目录