Method
__add__
(&self, other: PyObjectRef, vm: &VirtualMachine)
Source from the content-addressed store, hash-verified
| 1053 | } |
| 1054 | |
| 1055 | fn __add__(&self, other: PyObjectRef, vm: &VirtualMachine) -> PyResult<PyRef<Self>> { |
| 1056 | if let Some(other) = other.downcast_ref::<Self>() { |
| 1057 | self.read() |
| 1058 | .add(&other.read(), vm) |
| 1059 | .map(|array| Self::from(array).into_ref(&vm.ctx)) |
| 1060 | } else { |
| 1061 | Err(vm.new_type_error(format!( |
| 1062 | "can only append array (not \"{}\") to array", |
| 1063 | other.class().name() |
| 1064 | ))) |
| 1065 | } |
| 1066 | } |
| 1067 | |
| 1068 | fn __iadd__( |
| 1069 | zelf: PyRef<Self>, |
Callers
nothing calls this directly
Tested by
no test coverage detected