The first powerful tool provided by the DEAP framework is the creator module. The creator module is used as a meta-factory, and it enables us to extend existing classes by augmenting them with new attributes.
For example, suppose we have a class called Employee. Using the creator tool, we can extend the Employee class by creating a Developer class as follows:
from deap import creator
creator.create("Developer", Employee, position = "Developer", programmingLanguages = set)
The first argument passed to the create() function is the desired name for the new class. The second argument is the existing class to be extended. Then, each additional argument defines an attribute for the new class. If the argument is assigned a class (such as a dict or a set), it will be added to the new class as an instant attribute initialized in the constructor...