Is it possible to use keyword arguments from C?

D

Darren Dale

I am learning about the python C-api in order to contribute a feature
to numpy. I see a discussion (http://docs.python.org/extending/
extending.html#keyword-parameters-for-extension-functions) on how to
create a function or method in C that accepts kwargs, but is it
possible to call such a method from C using kwargs rather than
positional arguments?
 
D

Darren Dale

I am learning about the python C-api in order to contribute a feature
to numpy. I see a discussion (http://docs.python.org/extending/
extending.html#keyword-parameters-for-extension-functions) on how to
create a function or method  in C that accepts kwargs, but is it
possible to call such a method from C using kwargs rather than
positional arguments?

The answer was yes, this can be done. I found a short discussion at
the bottom of section 1.6: http://docs.python.org/extending/extending.html#calling-python-functions-from-c
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top