Update the name_chooser class. First, add documentation on the class and its interfaces. Second, add a new method for "solving" a gift exchange.  Previously, the generate_pairing() method searched for "pairings" by creating random permutations of the entire exchange until one of them met the criteria. Now, additionally, the generate_exchange() method will use search and constraint propagation to explore the space of giver->recipient pairings which meet the constraints of the problem.
Update the name_chooser class.
First, add documentation on the class and its interfaces.
Second, add a new method for "solving" a gift exchange.  Previously,
the generate_pairing() method searched for "pairings" by creating random
permutations of the entire exchange until one of them met the criteria.
Now, additionally, the generate_exchange() method will use search and
constraint propagation to explore the space of giver->recipient pairings
which meet the constraints of the problem.

tedzo/python_play