mirror of
https://github.com/RYDE-WORK/pybind11.git
synced 2026-02-02 21:45:53 +08:00
Add handle::is_none() method
This commit is contained in:
parent
8706fb9085
commit
f5e8b6d9cb
@ -40,6 +40,7 @@ public:
|
|||||||
inline detail::accessor attr(const char *key) const;
|
inline detail::accessor attr(const char *key) const;
|
||||||
inline pybind11::str str() const;
|
inline pybind11::str str() const;
|
||||||
inline pybind11::str repr() const;
|
inline pybind11::str repr() const;
|
||||||
|
bool is_none() const { return m_ptr == Py_None; }
|
||||||
template <typename T> T cast() const;
|
template <typename T> T cast() const;
|
||||||
template <return_value_policy policy = return_value_policy::automatic_reference, typename ... Args>
|
template <return_value_policy policy = return_value_policy::automatic_reference, typename ... Args>
|
||||||
#if __cplusplus > 201103L
|
#if __cplusplus > 201103L
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user