(zelf: &PyObject, vm: &VirtualMachine)
| 217 | |
| 218 | #[pyslot] |
| 219 | fn slot_str(zelf: &PyObject, vm: &VirtualMachine) -> PyResult<PyStrRef> { |
| 220 | let zelf = zelf.downcast_ref::<Self>().expect("expected bytearray"); |
| 221 | PyBytesInner::warn_on_str("str() on a bytearray instance", vm)?; |
| 222 | let class_name = zelf.class().name(); |
| 223 | let repr = zelf.inner().repr_with_name(&class_name, vm)?; |
| 224 | Ok(vm.ctx.new_str(repr)) |
| 225 | } |
| 226 | |
| 227 | fn __add__(&self, other: ArgBytesLike) -> Self { |
| 228 | self.inner().add(&other.borrow_buf()).into() |
nothing calls this directly
no test coverage detected