![]() |
Home | Libraries | People | FAQ | More |
<boost/python/iterator.hpp> provides types and functions for creating
Python iterators from C++ Containers and Iterators. Note that if your class_
supports random-access iterators, implementing __getitem__
(also known as the Sequence Protocol) may serve you better than using this
facility: Python will automatically create an iterator type for you (see
iter()),
and each access can be range-checked, leaving no possiblity of accessing
through an invalidated C++ iterator.