(
zelf: &Py<Self>,
other: &PyObject,
op: PyComparisonOp,
_vm: &VirtualMachine,
)
| 1556 | |
| 1557 | impl Comparable for PyStr { |
| 1558 | fn cmp( |
| 1559 | zelf: &Py<Self>, |
| 1560 | other: &PyObject, |
| 1561 | op: PyComparisonOp, |
| 1562 | _vm: &VirtualMachine, |
| 1563 | ) -> PyResult<PyComparisonValue> { |
| 1564 | if let Some(res) = op.identical_optimization(zelf, other) { |
| 1565 | return Ok(res.into()); |
| 1566 | } |
| 1567 | let other = class_or_notimplemented!(Self, other); |
| 1568 | Ok(op.eval_ord(zelf.as_wtf8().cmp(other.as_wtf8())).into()) |
| 1569 | } |
| 1570 | } |
| 1571 | |
| 1572 | impl Iterable for PyStr { |
no test coverage detected