Ticket #10933: patchContainsPython.txt
| File patchContainsPython.txt, 427 bytes (added by , 8 years ago) |
|---|
| Line | |
|---|---|
| 1 | diff --git a/include/boost/python/object_core.hpp b/include/boost/python/object_core.hpp |
| 2 | index 9c9dc10..2a40459 100644 |
| 3 | --- a/include/boost/python/object_core.hpp |
| 4 | +++ b/include/boost/python/object_core.hpp |
| 5 | @@ -496,7 +496,7 @@ template <typename U> |
| 6 | template <class T> |
| 7 | object api::object_operators<U>::contains(T const& key) const |
| 8 | { |
| 9 | - return this->attr("__contains__")(object(key)); |
| 10 | + return (*this)[object(key)]; |
| 11 | } |
| 12 | |
| 13 |
