def cloneHost(individual):
 clone = individual.__class__(individual)
 clone.fitness.values = individual.fitness.values
 return clone

def cloneHost ( individual ) : clone = individual . __class__ ( individual ) clone . fitness . values = individual . fitness . values return clone
specialized copy function that will work only on a list of tuples with no other member than a fitness .