(self, key)
return pos
Return node position(integer) for a given key. Else return None
Return node position(integer) for a given key. Else return None
Return node position ( integer ) for a given key . Else return None
def _get_node_pos(self, key):
        """
            Return node position(integer) for a given key. Else return None
        """
        if not self._hashring:
            return None

        key = self._gen_key(key)

        nodes = self._sorted_keys
        pos = bisect(nodes, key)

        if pos == len(nodes):
            return 0
        return pos
def _get_node_pos ( self , key ) : if not self . _hashring : return None key = self . _gen_key ( key ) nodes = self . _sorted_keys pos = bisect ( nodes , key ) if pos == len ( nodes ) : return 0 return pos