Skip to content

Commit 313fdcf

Browse files
committed
Removed unnecessary check for field that doesn't exist.
1 parent a53e837 commit 313fdcf

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

pygenalgo/genome/chromosome.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,6 @@ def __deepcopy__(self, memo):
213213
# Don't copy self reference.
214214
memo[id(self)] = new_object
215215

216-
# Don't copy the cache.
217-
if hasattr(self, "_cache"):
218-
memo[id(self._cache)] = self._cache.__new__(dict)
219-
# _end_if_
220-
221216
# Deepcopy ONLY the genome because
222217
# it is a (mutable) list of Genes.
223218
setattr(new_object, "_genome",

pygenalgo/genome/gene.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,6 @@ def __deepcopy__(self, memo):
208208
# Don't copy self reference.
209209
memo[id(self)] = new_object
210210

211-
# Don't copy the cache.
212-
if hasattr(self, "_cache"):
213-
memo[id(self._cache)] = self._cache.__new__(dict)
214-
# _end_if_
215-
216211
# Deepcopy ONLY the datum because it
217212
# might be a complex mutable object.
218213
setattr(new_object, "_datum",

0 commit comments

Comments
 (0)