| 460 | } |
| 461 | |
| 462 | Status InvalidType(PyObject* obj, const std::string& why) { |
| 463 | auto obj_as_str = PyObject_StdStringRepr(obj); |
| 464 | return Status::TypeError("Could not convert ", std::move(obj_as_str), " with type ", |
| 465 | Py_TYPE(obj)->tp_name, ": ", why); |
| 466 | } |
| 467 | |
| 468 | Status UnboxIntegerAsInt64(PyObject* obj, int64_t* out) { |
| 469 | if (PyLong_Check(obj)) { |
no test coverage detected