()
| 670 | |
| 671 | impl AsNumber for PyBytes { |
| 672 | fn as_number() -> &'static PyNumberMethods { |
| 673 | static AS_NUMBER: PyNumberMethods = PyNumberMethods { |
| 674 | remainder: Some(|a, b, vm| { |
| 675 | if let Some(a) = a.downcast_ref::<PyBytes>() { |
| 676 | a.__mod__(b.to_owned(), vm).to_pyresult(vm) |
| 677 | } else { |
| 678 | Ok(vm.ctx.not_implemented()) |
| 679 | } |
| 680 | }), |
| 681 | ..PyNumberMethods::NOT_IMPLEMENTED |
| 682 | }; |
| 683 | &AS_NUMBER |
| 684 | } |
| 685 | } |
| 686 | |
| 687 | impl Hashable for PyBytes { |
nothing calls this directly
no test coverage detected