[Python-Dev] PEP 399: Pure Python/C Accelerator Module Compatibiilty Requirements (original) (raw)

Nick Coghlan ncoghlan at gmail.com
Wed Apr 6 17:13:26 CEST 2011


On Thu, Apr 7, 2011 at 1:03 AM, James Y Knight <foom at fuhm.net> wrote:

Perhaps the argument handling for C functions ought to be enhanced to work like python's argument handling, instead of trying to hack it the other way around?

Oh, definitely. It is just that you pretty much have to use the *args hack when providing Python versions of C functions that accept both positional-only arguments and arbitrary keyword arguments.

For "ordinary" calls, simply switching to PyArg_ParseTupleAndKeywords over other alternatives basically deals with the problem.

Cheers, Nick.

-- Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-Dev mailing list