def __init__(self, node, i): self._node = node self._i = i key = "{0}:{1}".format( smart_text(i), smart_text(self._node), ) self._position = get_slot(key)
def get_node(self, key): i = bisect(self._nodes, get_slot(smart_text(key))) - 1 return self._nodes[i]._node
def __unicode__(self): return smart_text(self._versioned_key)
def deserialize(self, value): return json.loads(smart_text(value))