[Pyrex] kw-only arguments?

Stefan Behnel stefan_ml at behnel.de
Sat Sep 22 22:51:48 CEST 2007


Lenard Lindstrom wrote:
> Greg Ewing wrote:
>> Stefan Behnel wrote:
>>
>>   
>>> is there a way to keep keyword arguments from taking a positional parameter?
>>>     
>> Only what you can currently do in Python, e.g.
>>
>>    def func(a, b, **kwds):
>>      kw1 = kwds.pop('kw1')
>>      kw2 = kwds.pop('kw2')
>>
>> I believe that keyword-only arguments are being
>> considered for a future version of Python, and when
>> that happens, I'll probably be updating Pyrex
>> to match.
>>
>>   
> PEP 3102 has been implemented for Python 3.0 .  No mention is made of a 
> corresponding update to the C api.

Ah, thanks. I knew I read about that somewhere. I filed a bug report on Cython
and I'll try to come up with an implementation.

https://bugs.launchpad.net/cython/+bug/144125

Stefan



More information about the Pyrex mailing list