| 437 | } |
| 438 | |
| 439 | Status InvalidType(PyObject* obj, const std::string& why) { |
| 440 | auto obj_as_str = PyObject_StdStringRepr(obj); |
| 441 | return Status::TypeError("Could not convert ", std::move(obj_as_str), " with type ", |
| 442 | Py_TYPE(obj)->tp_name, ": ", why); |
| 443 | } |
| 444 | |
| 445 | Status UnboxIntegerAsInt64(PyObject* obj, int64_t* out) { |
| 446 | if (PyLong_Check(obj)) { |
no test coverage detected