Fixed dlib.range's iterator interface to work in python 3.

This commit is contained in:
Davis King 2016-08-14 09:12:51 -04:00
parent eec40e4fa6
commit 285bba7646
1 changed files with 2 additions and 1 deletions

View File

@ -189,7 +189,8 @@ void bind_basic_types()
.def_pickle(serialize_pickle<range_type>()); .def_pickle(serialize_pickle<range_type>());
class_<range_iter>("_range_iter") class_<range_iter>("_range_iter")
.def("next", &range_iter::next); .def("next", &range_iter::next)
.def("__next__", &range_iter::next);
{ {
typedef std::vector<std::pair<unsigned long, unsigned long> > type; typedef std::vector<std::pair<unsigned long, unsigned long> > type;