(self, nodes=None, weights=None)
nodes   - List of nodes(strings)
            weights - Dictionary of node wheights where keys are nodes names.
                      if not set, all nodes will be equal.
nodes   - List of nodes(strings)
            weights - Dictionary of node wheights where keys are nodes names.
                      if not set, all nodes will be equal.
nodes - List of nodes ( strings ) weights - Dictionary of node wheights where keys are nodes names . if not set all nodes will be equal .
def __init__(self, nodes=None, weights=None):
        """
            nodes   - List of nodes(strings)
            weights - Dictionary of node wheights where keys are nodes names.
                      if not set, all nodes will be equal.
        """
        self._hashring = dict()
        self._sorted_keys = []

        self._nodes = set(nodes or [])
        self._weights = weights if weights else {}

        self._build_circle()
def __init__ ( self , nodes = None , weights = None ) : self . _hashring = dict ( ) self . _sorted_keys = [ ] self . _nodes = set ( nodes or [ ] ) self . _weights = weights if weights else { } self . _build_circle ( )