Update the cached value for an object. This works even if the descriptor is read-only. This is particularly useful when initializing the object (e.g. in its __new__ or __init__).
(self, obj, value)
| 84 | cls.__del__ = __del__ |
| 85 | |
| 86 | def set(self, obj, value): |
| 87 | """Update the cached value for an object. |
| 88 | |
| 89 | This works even if the descriptor is read-only. This is |
| 90 | particularly useful when initializing the object (e.g. in |
| 91 | its __new__ or __init__). |
| 92 | """ |
| 93 | self.instances[id(obj)] = value |
| 94 | |
| 95 | |
| 96 | class classonly: |