()
| 543 | |
| 544 | impl AsNumber for PyDict { |
| 545 | fn as_number() -> &'static PyNumberMethods { |
| 546 | static AS_NUMBER: PyNumberMethods = PyNumberMethods { |
| 547 | or: Some(|a, b, vm| { |
| 548 | if let Some(a) = a.downcast_ref::<PyDict>() { |
| 549 | PyDict::__or__(a, b.to_pyobject(vm), vm) |
| 550 | } else { |
| 551 | Ok(vm.ctx.not_implemented()) |
| 552 | } |
| 553 | }), |
| 554 | inplace_or: Some(|a, b, vm| { |
| 555 | if let Some(a) = a.downcast_ref::<PyDict>() { |
| 556 | a.to_owned() |
| 557 | .__ior__(b.to_pyobject(vm), vm) |
| 558 | .map(|d| d.into()) |
| 559 | } else { |
| 560 | Ok(vm.ctx.not_implemented()) |
| 561 | } |
| 562 | }), |
| 563 | ..PyNumberMethods::NOT_IMPLEMENTED |
| 564 | }; |
| 565 | &AS_NUMBER |
| 566 | } |
| 567 | } |
| 568 | |
| 569 | impl Comparable for PyDict { |
nothing calls this directly
no test coverage detected