Add handle::is_none() method

This commit is contained in:
Ivan Smirnov 2016-08-29 02:37:03 +01:00
parent 8706fb9085
commit f5e8b6d9cb

View File

@ -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