[C++-sig] Re: indexing_v2 status update
Raoul Gough
RaoulGough at yahoo.co.uk
Tue Nov 25 01:12:01 CET 2003
David Abrahams <dave at boost-consulting.com> writes:
> Raoul Gough <RaoulGough at yahoo.co.uk> writes:
>
>> So I have two loosely related questions - what do people thing about
>> including the current indexing_v2 suite in release 1.31,
>
> 2 questions:
>
> a. Where can I browse the documentation?
>
> b. Where can I review the test code?
Both are available on the indexing_v2 branch in libs/python, so you
could just do an update -r indexing_v2 in that directory. The docco is
then in libs/python/doc/v2/containers.html and the test code is in
files like test_<container>_*.cpp and .py in libs/python/test/
Alternatively, the html-only portion of the documentation is available
at:
http://cvs.sourceforge.net/viewcvs.py/*checkout*/boost/boost/libs/python/doc/v2/Attic/containers.html?rev=1.1.2
I'm still working on some updates to this.
>
>> and should I try adding the iterator-based constructor support?
>
> IMO yes, but my opinion isn't strongly-held.
I guess the real question is how to do it. I'll start looking into it
a bit deeper, but I suspect I'll need some advice. Converting the
Python iterable object to two C++ iterators isn't hard, but I don't
know how to create the forwarding function and a sensible __iter__
overload that gets called (only) when appropriate. The problem is that
there will be other container constructors that really do take just a
single parameter, so how can the code decide whether to try one of
them or whether to try making two C++ iterators out of the parameter.
For one thing, it would be good if the code could use the normal copy
constructor if passed a wrapped C++ object of the same type, or at
least use C++ iterators directly rather than going through a C++
wrapper of a Python iterator that is actually a C++ iterator (C++ ->
Python -> C++ dispatching). I don't know how realistic that idea is.
--
Raoul Gough.
export LESS='-X'
More information about the Cplusplus-sig
mailing list