(a: PyObjectRef, b: PyObjectRef, vm: &VirtualMachine)
| 248 | |
| 249 | #[pyfunction] |
| 250 | fn iconcat(a: PyObjectRef, b: PyObjectRef, vm: &VirtualMachine) -> PyResult { |
| 251 | // Best attempt at checking that a is sequence-like. |
| 252 | if !a.class().has_attr(identifier!(vm, __getitem__)) |
| 253 | || a.fast_isinstance(vm.ctx.types.dict_type) |
| 254 | { |
| 255 | return Err(vm.new_type_error(format!( |
| 256 | "'{}' object can't be concatenated", |
| 257 | a.class().name() |
| 258 | ))); |
| 259 | } |
| 260 | vm._iadd(&a, &b) |
| 261 | } |
| 262 | |
| 263 | #[pyfunction] |
| 264 | fn ifloordiv(a: PyObjectRef, b: PyObjectRef, vm: &VirtualMachine) -> PyResult { |
nothing calls this directly
no test coverage detected