(zelf: &Py<Self>, vm: &VirtualMachine)
| 143 | impl Representable for PyGetSet { |
| 144 | #[inline] |
| 145 | fn repr_str(zelf: &Py<Self>, vm: &VirtualMachine) -> PyResult<String> { |
| 146 | let class = unsafe { zelf.class.borrow_static() }; |
| 147 | // Special case for object type |
| 148 | if core::ptr::eq(class, vm.ctx.types.object_type) { |
| 149 | Ok(format!("<attribute '{}'>", zelf.name)) |
| 150 | } else { |
| 151 | Ok(format!( |
| 152 | "<attribute '{}' of '{}' objects>", |
| 153 | zelf.name, |
| 154 | class.name() |
| 155 | )) |
| 156 | } |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | pub(crate) fn init(context: &'static Context) { |
nothing calls this directly
no test coverage detected