@@ -19,11 +19,15 class Data: | |||
|
19 | 19 | ''' |
|
20 | 20 | raise ValueError, "This class has not been implemented" |
|
21 | 21 | |
|
22 | def copy(self): | |
|
22 | def copy(self, obj=None): | |
|
23 | 23 | |
|
24 | return copy.copy(self) | |
|
24 | if obj == None: | |
|
25 | return copy.deepcopy(self) | |
|
26 | ||
|
27 | for key in self.__dict__.keys(): | |
|
28 | obj.__dict__[key] = self.__dict__[key] | |
|
25 | 29 | |
|
26 |
def deepcopy(self |
|
|
30 | def deepcopy(self): | |
|
27 | 31 | |
|
28 | 32 | return copy.deepcopy(self) |
|
29 | 33 |
General Comments 0
You need to be logged in to leave comments.
Login now