From 2effea8085cd00bd8677d3069e32d26df3a5f53a Mon Sep 17 00:00:00 2001 From: Stuart Mitchell Date: Mon, 7 Jan 2013 21:42:29 +1300 Subject: [PATCH] changes from issue http://code.google.com/p/pulp-or/issues/detail?id=45 LpProblem.deepcopy() --- src/pulp/pulp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pulp/pulp.py b/src/pulp/pulp.py index 9ba9afb..dc54444 100755 --- a/src/pulp/pulp.py +++ b/src/pulp/pulp.py @@ -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():