From 6aa4b8b82f9980fa208f97913fd9687fef6e58c2 Mon Sep 17 00:00:00 2001 From: SimpleArt <71458112+SimpleArt@users.noreply.github.com> Date: Tue, 29 Dec 2020 19:36:06 -0500 Subject: [PATCH] Cleaned up gene comparison method --- src/structure/gene.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/structure/gene.py b/src/structure/gene.py index b19495a..9b24efd 100644 --- a/src/structure/gene.py +++ b/src/structure/gene.py @@ -16,13 +16,7 @@ class Gene: def __eq__(self, other_gene): """Comparing two genes by their value.""" - - try: - other_value = other_gene.value - except: - other_value = other_gene - - return self.value == other_value + return self.value == Gene(other_value).value def __repr__(self):