(zelf: PyObjectRef, other: PyObjectRef, vm: &VirtualMachine)
| 220 | } |
| 221 | |
| 222 | pub fn or_op(zelf: PyObjectRef, other: PyObjectRef, vm: &VirtualMachine) -> PyResult { |
| 223 | if !has_union_operands(zelf.clone(), other.clone(), vm) |
| 224 | && (!is_unionable(zelf.clone(), vm) || !is_unionable(other.clone(), vm)) |
| 225 | { |
| 226 | return Ok(vm.ctx.not_implemented()); |
| 227 | } |
| 228 | |
| 229 | let left = type_check(zelf, vm)?; |
| 230 | let right = type_check(other, vm)?; |
| 231 | let tuple = PyTuple::new_ref(vec![left, right], &vm.ctx); |
| 232 | make_union(&tuple, vm) |
| 233 | } |
| 234 | |
| 235 | fn make_parameters(args: &Py<PyTuple>, vm: &VirtualMachine) -> PyResult<PyTupleRef> { |
| 236 | let parameters = genericalias::make_parameters(args, vm); |
no test coverage detected