This commit is contained in:
Stuart Mitchell
2013-01-07 21:42:29 +13:00
parent 803c3d37e8
commit 2effea8085

View File

@@ -1125,7 +1125,7 @@ class LpProblem(object):
def deepcopy(self):
"""Make a copy of self. Expressions are copied by value"""
lpcopy = LpProblem(name = self.name, sense = self.sense)
if lpcopy.objective != None:
if lpcopy.objective is not None:
lpcopy.objective = self.objective.copy()
lpcopy.constraints = {}
for k,v in self.constraints.iteritems():