| 24 | |
| 25 | |
| 26 | class WithoutDict: |
| 27 | __slots__ = ["value"] |
| 28 | |
| 29 | def __init__(self, value): |
| 30 | self.value = value |
| 31 | |
| 32 | def __deepcopy__(self, memo): |
| 33 | raise TypeError("Forcing shallow copy fallback") |
| 34 | |
| 35 | def __copy__(self): |
| 36 | return self |
| 37 | |
| 38 | |
| 39 | class NonCopyableObject: |
no outgoing calls