mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-25 14:45:12 +00:00
skip typevar
This commit is contained in:
parent
d1dc670142
commit
fd7d4d0c9b
@ -130,33 +130,33 @@ class TypeVar : public object {
|
||||
// NameWrapper(const char *name) { attr("__name__") = name; }
|
||||
// };
|
||||
|
||||
template <typename T>
|
||||
class TypeVarObject : public object {
|
||||
PYBIND11_OBJECT_DEFAULT(TypeVarObject, object, PyObject_Type)
|
||||
using object::object;
|
||||
TypeVarObject(const char *name) {
|
||||
attr("__name__") = name;
|
||||
attr("__bound__") = object();
|
||||
attr("__bound__").attr("__name__") = pybind11::detail::make_caster<T>::name;
|
||||
attr("__constraints__") = pybind11::make_tuple();
|
||||
}
|
||||
// TypeVarObject(const char *name, py::typing::Tuple<pybind11::type, pybind11::ellipse> tuple){
|
||||
// attr("__name__") = name;
|
||||
// attr("__bound__") = py::none();
|
||||
// attr("__constraints__") = tuple;
|
||||
// }
|
||||
};
|
||||
// template <typename T>
|
||||
// class TypeVarObject : public object {
|
||||
// PYBIND11_OBJECT_DEFAULT(TypeVarObject, object, PyObject_Type)
|
||||
// using object::object;
|
||||
// TypeVarObject(const char *name) {
|
||||
// attr("__name__") = name;
|
||||
// attr("__bound__") = object();
|
||||
// attr("__bound__").attr("__name__") = pybind11::detail::make_caster<T>::name;
|
||||
// attr("__constraints__") = pybind11::make_tuple();
|
||||
// }
|
||||
// // TypeVarObject(const char *name, py::typing::Tuple<pybind11::type, pybind11::ellipse> tuple){
|
||||
// // attr("__name__") = name;
|
||||
// // attr("__bound__") = py::none();
|
||||
// // attr("__constraints__") = tuple;
|
||||
// // }
|
||||
// };
|
||||
|
||||
template <>
|
||||
class TypeVarObject : public object {
|
||||
PYBIND11_OBJECT_DEFAULT(TypeVarObject, object, PyObject_Type)
|
||||
using object::object;
|
||||
TypeVarObject(const char *name) {
|
||||
attr("__name__") = name;
|
||||
attr("__bound__") = py::none();
|
||||
attr("__constraints__") = pybind11::make_tuple();
|
||||
}
|
||||
};
|
||||
// template <>
|
||||
// class TypeVarObject : public object {
|
||||
// PYBIND11_OBJECT_DEFAULT(TypeVarObject, object, PyObject_Type)
|
||||
// using object::object;
|
||||
// TypeVarObject(const char *name) {
|
||||
// attr("__name__") = name;
|
||||
// attr("__bound__") = py::none();
|
||||
// attr("__constraints__") = pybind11::make_tuple();
|
||||
// }
|
||||
// };
|
||||
|
||||
class ParamSpec : public object {
|
||||
PYBIND11_OBJECT_DEFAULT(ParamSpec, object, PyObject_Type)
|
||||
|
Loading…
Reference in New Issue
Block a user