(zelf: &Py<Self>, vm: &VirtualMachine)
| 109 | impl Representable for PyNativeFunction { |
| 110 | #[inline] |
| 111 | fn repr_str(zelf: &Py<Self>, vm: &VirtualMachine) -> PyResult<String> { |
| 112 | if let Some(bound) = zelf |
| 113 | .zelf |
| 114 | .as_ref() |
| 115 | .filter(|b| !b.class().is(vm.ctx.types.module_type)) |
| 116 | { |
| 117 | Ok(format!( |
| 118 | "<built-in method {} of {} object at {:#x}>", |
| 119 | zelf.value.name, |
| 120 | bound.class().name(), |
| 121 | bound.get_id() |
| 122 | )) |
| 123 | } else { |
| 124 | Ok(format!("<built-in function {}>", zelf.value.name)) |
| 125 | } |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | #[pyclass( |