class documentation

class Shuffler:

View In Hierarchy

This class implements shuffling with a special consistency property. Consistency means that, for a given seed and key function, if two sets of items are shuffled, the resulting order will agree on the intersection of the two sets. For example, if items are removed from an original set, the shuffled order for the new set will be the shuffled order of the original set restricted to the smaller set.
Class Method ​_hash​_text Undocumented
Method __init__ Undocumented
Method ​_hash​_item Undocumented
Method shuffle Return a new list of the items in a shuffled order.
Class Variable hash​_algorithm Undocumented
Instance Variable seed Undocumented
Instance Variable seed​_source Undocumented
Property seed​_display Undocumented
@classmethod
def _hash_text(cls, text):

Undocumented

def __init__(self, seed=None):

Undocumented

def _hash_item(self, item, key):

Undocumented

def shuffle(self, items, key):

Return a new list of the items in a shuffled order.

The key is a function that accepts an item in items and returns a string unique for that item that can be viewed as a string id. The order of the return value is deterministic. It depends on the seed and key function but not on the original order.

hash_algorithm: str =

Undocumented

seed =

Undocumented

seed_source =

Undocumented

@property
seed_display =

Undocumented