[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-cpp-sig
Subject:    [C++-sig] iterator over list and sequences
From:       eric () boost-consulting ! com (Eric Niebler)
Date:       2005-11-29 4:48:36
Message-ID: 438BDDA4.3020507 () boost-consulting ! com
[Download RAW message or body]

Yves Secretan wrote:
> 
> In search for a simple way to iterate in C++ over a boost::python::list, 
> I only found a discussion about how nice it would be to have one 
> (http://mail.python.org/pipermail/c++-sig/2003-March/003528.html). So I 
> wrote a set of C++ iterators and ended up with a syntax a little more 
> complex than what was originally proposed by David Abrahams, but maybe I 
> missed something.
> 


We've already got one. :-) I wrote a STL iterator for python sequences. 
It is an input iterator over any iterable python object, not just lists. 
It has not yet been part of an official Boost release, but you can find 
it in Boost main CVS at boost/python/stl_iterator.hpp. It'll be part of 
the next major release.

Hope that helps,

-- 
Eric Niebler
Boost Consulting
www.boost-consulting.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic