mirror of
https://github.com/pybind/pybind11.git
synced 2025-03-02 06:42:45 +00: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…
Reference in New Issue
Block a user