(vm: &VirtualMachine, obj: PyObjectRef)
| 56 | |
| 57 | impl TryFromObject for ArgCallable { |
| 58 | fn try_from_object(vm: &VirtualMachine, obj: PyObjectRef) -> PyResult<Self> { |
| 59 | let Some(callable) = obj.to_callable() else { |
| 60 | return Err( |
| 61 | vm.new_type_error(format!("'{}' object is not callable", obj.class().name())) |
| 62 | ); |
| 63 | }; |
| 64 | let call = callable.call; |
| 65 | Ok(Self { obj, call }) |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | /// An iterable Python object. |
nothing calls this directly
no test coverage detected