Commit f5e8b6d9 by Ivan Smirnov

Add handle::is_none() method

parent 8706fb90
......@@ -40,6 +40,7 @@ public:
inline detail::accessor attr(const char *key) const;
inline pybind11::str str() const;
inline pybind11::str repr() const;
bool is_none() const { return m_ptr == Py_None; }
template <typename T> T cast() const;
template <return_value_policy policy = return_value_policy::automatic_reference, typename ... Args>
#if __cplusplus > 201103L
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment