[C++-sig] Re: C arrays solution

Niall Douglas s_sourceforge at nedprod.com
Tue Oct 14 23:39:52 CEST 2003


On 14 Oct 2003 at 7:42, David Abrahams wrote:

> > The key here is that MyList knows nothing of python and offers no
> > more than a C array of pointers, something which up until now was
> > hard to wrap without lots of munge code.
> 
> I'm not sure what "munge code" means.  The behavior you show above is
> almost trivial to achieve using Boost.Python, without anything I
> consider to be "munge code".

I'm getting that picture from Raoul. However if it's so easy, why is 
Raoul developing indexing_suite?

> Question 1:  when you modify b above, do you expect it to affect a?

Yes.

> Question 2:  do you expect b to be an actual Python list,
>              i.e. type(b) == list ??

Not really as it can't be extended in length. So while it looks like 
a list and acts like a list, it's not a list.

(Don't worry, the users will know this. And remember this affects 
about seven different areas of the library which I've never used so 
basically I'm providing a default action for users so they can tell 
me afterwards if they don't like it).

Cheers,
Niall




-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 208 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20031014/2715b625/attachment.pgp>


More information about the Cplusplus-sig mailing list