(self)
| 1235 | return self |
| 1236 | |
| 1237 | def __copy__(self): |
| 1238 | inst = self.__class__.__new__(self.__class__) |
| 1239 | inst.__dict__.update(self.__dict__) |
| 1240 | # Create a copy and avoid triggering descriptors |
| 1241 | inst.__dict__["data"] = self.__dict__["data"].copy() |
| 1242 | return inst |
| 1243 | |
| 1244 | def copy(self): |
| 1245 | if self.__class__ is UserDict: |