-
In pybind11, the documentation for
So I used the [](py::object /* self */) -> py::object {
return py::type::of( py::int_() );
} According to the nanobind porting guide, we should replace |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Actually the expression
|
Beta Was this translation helpful? Give feedback.
nb::type<T>
is restricted to bindings (e.g., things that are bound withnb::class_<>
). This could perhaps be documented better. To directly get the type, usenb::borrow(&PyLong_Type)