From f2e28c0e1905c8a32e5a3be7a81fa7c4e518e325 Mon Sep 17 00:00:00 2001 From: Arthur O'Dwyer Date: Sun, 16 Apr 2017 23:00:50 -0700 Subject: [PATCH] Clean some dead code in `__calculateIntraStringHappiness`. Indeed, it's dead in the Java version too. --- copycat/workspaceObject.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/copycat/workspaceObject.py b/copycat/workspaceObject.py index 7b4f5c1..f825cb7 100644 --- a/copycat/workspaceObject.py +++ b/copycat/workspaceObject.py @@ -66,13 +66,8 @@ class WorkspaceObject(WorkspaceStructure): return 100.0 if self.group: return self.group.totalStrength - bondStrength = 0.0 - for bond in self.bonds: - bondStrength += bond.totalStrength - divisor = 6.0 - if self.spansString(): # then we have already returned - divisor = 3.0 - return bondStrength / divisor + bondStrength = sum(bond.totalStrength for bond in self.bonds) + return bondStrength / 6.0 def __calculateRawImportance(self): """Calculate the raw importance of this object.