mirror of
https://github.com/RYDE-WORK/pybind11.git
synced 2026-01-22 14:57:07 +08:00
PR #425 removed the bool operator from attribute accessors. This is likely in use by existing code as it was the only way before #425 added the `hasattr` function to check for the existence of an attribute, via: if (obj.attr("foo")) { ... } This commit adds it back in for attr and item accessors, but with a deprecation warning to use `hasattr(obj, ...)` or `obj.contains(...)` instead.