From 1bd806591e9a29d66586db7220fd116c06eaff04 Mon Sep 17 00:00:00 2001 From: SimpleArt <71458112+SimpleArt@users.noreply.github.com> Date: Thu, 19 Nov 2020 12:34:23 -0500 Subject: [PATCH] Cleaned up __repr__ --- src/structure/population.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/structure/population.py b/src/structure/population.py index b7ca342..b602603 100644 --- a/src/structure/population.py +++ b/src/structure/population.py @@ -197,7 +197,7 @@ class Population: """Returns a backend string representation of the entire population""" return ''.join( - f'Chromosome - {self.index_of(chromosome)} {chromosome} ' + - f'/ Fitness = {chromosome.get_fitness()}\n' - for chromosome in self + f'Chromosome - {index} {self[index]} ' + + f'/ Fitness = {self[index].get_fitness()}\n' + for index in range(len(self)) )