diff --git a/include/boost/python/object/iterator.hpp b/include/boost/python/object/iterator.hpp index 3e24afd2..ab748fe8 100644 --- a/include/boost/python/object/iterator.hpp +++ b/include/boost/python/object/iterator.hpp @@ -129,7 +129,11 @@ namespace detail return class_(name, no_init) .def("__iter__", identity_function()) .def( +#if PY_VERSION_HEX >= 0x03000000 + "__next__" +#else "next" +#endif , make_function( next_fn() , policies