[C++-sig] Re: boost-python + lambda

Mike Rovner mike at nospam.com
Wed Apr 7 20:08:49 CEST 2004


Neal D. Becker wrote:
> I'd like to wrap a class, but with a modified interface to some member
> functions.  The easy way is write c++ code to wrap the class, inherit
> from it, and add the new member function, then expose that.

I modify interface all the time to make it more pythonic ;)
Usually I write a thin wrapper with desired interface and expose it.

> I wonder if lambda can be used as a more direct approach?  If so,
> what would the syntax look like?

You don't need that. You can expose members as functions and vice versa.

Please provide some complete example of exxisting class
and desired python interface to it.

Regards,
Mike







More information about the Cplusplus-sig mailing list