@@ -19,14 +19,18 class Data: | |||||
19 | ''' |
|
19 | ''' | |
20 | raise ValueError, "This class has not been implemented" |
|
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 | return copy.deepcopy(self) |
|
32 | return copy.deepcopy(self) | |
29 |
|
33 | |||
30 | class Noise(Data): |
|
34 | class Noise(Data): | |
31 | ''' |
|
35 | ''' | |
32 | classdocs |
|
36 | classdocs |
General Comments 0
You need to be logged in to leave comments.
Login now