(&self, attr_name: &'static PyStrInterned, value: PyObjectRef)
| 885 | } |
| 886 | |
| 887 | pub fn set_attr(&self, attr_name: &'static PyStrInterned, value: PyObjectRef) { |
| 888 | // Invalidate caches BEFORE modifying attributes so that borrowed |
| 889 | // pointers in cache entries are nullified while the source objects |
| 890 | // are still alive. |
| 891 | self.modified(); |
| 892 | self.attributes.write().insert(attr_name, value); |
| 893 | } |
| 894 | |
| 895 | /// Internal get_attr implementation for fast lookup on a class. |
| 896 | /// Searches the full MRO (including self) with method cache acceleration. |
no test coverage detected