(
zelf: &Py<Self>,
other: &PyObject,
op: PyComparisonOp,
vm: &VirtualMachine,
)
| 604 | |
| 605 | impl Comparable for PyGenericAlias { |
| 606 | fn cmp( |
| 607 | zelf: &Py<Self>, |
| 608 | other: &PyObject, |
| 609 | op: PyComparisonOp, |
| 610 | vm: &VirtualMachine, |
| 611 | ) -> PyResult<PyComparisonValue> { |
| 612 | op.eq_only(|| { |
| 613 | let other = class_or_notimplemented!(Self, other); |
| 614 | if zelf.starred != other.starred { |
| 615 | return Ok(PyComparisonValue::Implemented(false)); |
| 616 | } |
| 617 | Ok(PyComparisonValue::Implemented( |
| 618 | zelf.__origin__() |
| 619 | .rich_compare_bool(&other.__origin__(), PyComparisonOp::Eq, vm)? |
| 620 | && zelf.__args__().rich_compare_bool( |
| 621 | &other.__args__(), |
| 622 | PyComparisonOp::Eq, |
| 623 | vm, |
| 624 | )?, |
| 625 | )) |
| 626 | }) |
| 627 | } |
| 628 | } |
| 629 | |
| 630 | impl Hashable for PyGenericAlias { |
nothing calls this directly
no test coverage detected