def cloneParasite(individual):
 clone = individual.__class__((list(seq) for seq in individual))
 clone.fitness.values = individual.fitness.values
 return clone

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