[Pyrex] [Cython-dev] kw-only arguments?

Stefan Behnel stefan_ml at behnel.de
Tue Sep 25 09:08:17 CEST 2007


Robert Bradshaw wrote:
> What is the plan for P3k vs. Python 2.x? Should there be a separate
> branch? I imagine the ParseArgumentsAndKeywords function will change to
> reflect this in P3k, so much of this "manual labor" will be redundant.

There is the "py3k" branch in Python's SVN, but since the PEP doesn't say
anything about changes to the C API, I don't expect anything to happen any
time soon. I mean, you can easily do this in plain C code already by parsing
the args accordingly. It's just not currently available in Pyrex/Cython, as
you can't adapt the way it parses the arguments from Pyrex code.

The patch isn't that long, and there isn't usually that much "manual labour"
involved in the generated code. It's pretty optimised already.

Regarding the general question about a 3k branch for Cython: I'd rather wait
and see if we can't handle that with conditional compilation as we currently
do with most newer features. I prefer keeping Cython a single tool for all
target architectures and versions as long as we can. And it would be great to
generate C code that compiles and works without changes for Python 2.3 through
Python 3.0. :]

Stefan



More information about the Pyrex mailing list