Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2008-06-10 15:51:43


Gennadiy Rozental wrote:
> Hi,
>
> I an using vector_indexing_suite for both standard containers export and for our
> in-house ones. I've noticed that boost::python::error_already_set is bwing
> thrown every time iteration in python over container instances is about to
> finish. The exception is ignored somewhere inside boost::python but it's still
> quite inconvenient for debugging: I want to catch actual error, but can't skip
> 100s of fake ones. Is there any reason why it was designed this way? Is there
> any way to avoid it?

I believe you can use python::stl_input_iterator
(boost/python/stl_iterator.hpp) to iterate over a python sequence, and
it won't throw an exception.

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk