(self, memo)
| 302 | return result |
| 303 | |
| 304 | def __deepcopy__(self, memo): |
| 305 | cls = self.__class__ |
| 306 | result = cls.__new__(cls) |
| 307 | state = {} |
| 308 | memo[id(self)] = result |
| 309 | for k, v in self.__dict__.items(): |
| 310 | if not isinstance(v, weakref.ReferenceType): |
| 311 | state[k] = copy.deepcopy(v, memo) |
| 312 | result.__dict__.update(state) |
| 313 | return result |
| 314 | |
| 315 | |
| 316 | # expr: None (i.e. fake expression which is used to mark input) |