[C++-sig] Re: bypassing boost::python's keyword handling
David Abrahams
dave at boost-consulting.com
Thu Dec 2 05:05:16 CET 2004
Garrick Meeker wrote:
> Is it possible to use boost to wrap a function that expects args and
> keywords as two PyObject's? This is old C-style Python code that could
> be written but the python syntax must be the same. Imagine I'm
> implementing some sort of dictionary class in C++. The easiest way
> might be to wrap this in python, so this may be purely an academic
> question. Something like:
>
> void f(PyObject *args, PyObject *kw);
> def("f_base", &f);
>
> def f(*args, **kw):
> f_base(args, kw)
>
> f(a=1, b=2, c=3)
Does
http://www.boost.org/libs/python/doc/v2/raw_function.html
help?
--
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com
More information about the Cplusplus-sig
mailing list