[Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython
g.brandl at gmx.net
Sun Dec 9 09:09:58 CET 2012
Am 04.12.2012 20:35, schrieb Antoine Pitrou:
> On Tue, 04 Dec 2012 11:04:09 -0800
> Larry Hastings <larry at hastings.org> wrote:
>> Along these lines, I've been contemplating proposing that Clinic
>> specifically understand "path" arguments, distinctly from other string
>> arguments, as they are both common and rarely handled correctly. My
>> main fear is that I probably don't understand all their complexities
>> either ;-)
>> Anyway, this is certainly something we can consider *improving* for
>> Python 3.4. But for now I'm trying to make Clinic an indistinguishable
>> drop-in replacement.
>> Naturally I agree Clinic needs more polishing. But the problem you fear
>> is already solved. Clinic allows precisely expressing any existing
>> PyArg_ "format unit"** through a combination of the type of the
>> parameter and its "flags".
> Very nice then! Your work is promising, and I hope we'll see a version
> of it some day in Python 3.4 (or 3.4+k).
Looks good to me to, and as someone who once tried to go the "preprocessor
macro" route, much saner.
One small thing: May I propose to make the "special comments" a little more
self-descriptive? Yes, "argument clinic" is a nice name for the whole thing,
but if you encounter it in a C file there's nothing it tells you about what
More information about the Python-Dev