[Pyrex] kw-only arguments?

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Sep 21 02:43:02 CEST 2007


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.

-- 
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | Carpe post meridiem!          	  |
Christchurch, New Zealand	   | (I'm not a morning person.)          |
greg.ewing at canterbury.ac.nz	   +--------------------------------------+



More information about the Pyrex mailing list