Skip to content

Commit

Permalink
Removed unnecessary check for field that doesn't exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
vrettasm committed Mar 8, 2025
1 parent a53e837 commit 313fdcf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
5 changes: 0 additions & 5 deletions pygenalgo/genome/chromosome.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,6 @@ def __deepcopy__(self, memo):
# Don't copy self reference.
memo[id(self)] = new_object

# Don't copy the cache.
if hasattr(self, "_cache"):
memo[id(self._cache)] = self._cache.__new__(dict)
# _end_if_

# Deepcopy ONLY the genome because
# it is a (mutable) list of Genes.
setattr(new_object, "_genome",
Expand Down
5 changes: 0 additions & 5 deletions pygenalgo/genome/gene.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,6 @@ def __deepcopy__(self, memo):
# Don't copy self reference.
memo[id(self)] = new_object

# Don't copy the cache.
if hasattr(self, "_cache"):
memo[id(self._cache)] = self._cache.__new__(dict)
# _end_if_

# Deepcopy ONLY the datum because it
# might be a complex mutable object.
setattr(new_object, "_datum",
Expand Down

0 comments on commit 313fdcf

Please sign in to comment.