[Python-Dev] Re: "groupby" iterator

Greg Ewing greg at cosc.canterbury.ac.nz
Tue Dec 2 18:42:11 EST 2003

Thomas Heller <theller at python.net>:

> The latter has another advantage (or is this a disadvantage of the
> former?): You can invoke
>   lambda x: x.something
> with a keyword arg, which would not be possible with a C implemented
> function, I assume.

If you're asking whether a C function can have a keyword argument
whose name is determined at runtime, I think that could be arranged --
it would just be a matter of concocting the appropriate arguments to
PyArg_ParseTupleAndKeywords dynamically.

As to a user-friendly syntax for invoking it, maybe something like


Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+

More information about the Python-Dev mailing list