[C++-sig] [docs][pyste] wrapper class

David Abrahams dave at boost-consulting.com
Tue Jun 21 04:16:46 CEST 2005


"Niall Douglas" <s_sourceforge at nedprod.com> writes:

> On 16 Jun 2005 at 22:57, David Abrahams wrote:
>
>> >> > Because if my C++ is going through a BPL wrapped virtual function
>> >> > and is passing it an array of unsigned int, if python doesn't
>> >> > overload it then it goes C++=>Python=>C++ and no extra action is
>> >> > required.
>> >> 
>> >> Not if you use the new-style polymorphism support.
>> >
>> > Is there a special doc page or wiki entry describing this? It has
>> > been added when I wasn't paying attention to this mailing list.
>> 
>> http://tinyurl.com/8gynk#python.class_virtual_functions
>> (http://www.boost.org/libs/python/doc/tutorial/doc/html/python/exposin
>> g.html#python.class_virtual_functions)
>> 
>> http://tinyurl.com/aknmp
>> (http://www.boost.org/libs/python/doc/v2/wrapper.html)
>> 
>> This is the recommended approach; it performs better and has fewer
>> problems in almost every way than the old one. -- Dave Abrahams Boost
>> Consulting www.boost-consulting.com
>
> None of those docs told me why the new way was any better than the 
> old way. 

That might be useful, OTOH most people reading the docs are new users;
there's no point in confusing them by discussing an "old way" of doing
things.  I think putting the a priority on recommending the best way
now was the right choice.

> I did however find this message:
>
> http://mail.python.org/pipermail/c++-sig/2004-July/007826.html
>
> Now plus or minus a few items, this is what I was looking for. It's 
> rather a shame this isn't in the docs

Well, I just went through the docs looking for a good place to put the
information about the differences between the old way and the new way,
but couldn't find one.  Any suggestions?  Can you suggest a place
where you would have actually looked for it?

> but it's far more of a shame that pyste generates old code here as
> like I'm sure many people, I used pyste to teach me how to write in
> BPL.

I tried to encourage it, as you can see.

> I'd imagine pyste could be patched easily enough. I've added it to
> my todo list for the v0.86 release of TnFOX. As before, I'll submit
> the new version here.

That'd be great, thanks.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com




More information about the Cplusplus-sig mailing list