[issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk

Larry Hastings report at bugs.python.org
Fri Dec 14 08:21:57 CET 2012


Larry Hastings added the comment:

I don't think we can solve the problem of the output being too long for your liking.  Personally I like the output; I find it eminently readable, and making it shorter would impair that.  I think in the majority of uses Clinic will be a win for readability.

I do have one suggestion that might mitigate the problem for you.  What if you put all the argument processing in a separate file (with .c or .h extension) and #include that in _decimal.c?  You don't *have* to have the body for the impl function immediately after the DSL block; you could just have a semicolon there after the block and the C compiler would interpret it as a (redundant) declaration.  You'd have to maintain declaring the impl yourself in _decimal.c, but I'm guessing you'd rather do that than have all the Clinic stuff blowing up _decimal.c.

Finally, since you have not addressed it directly, let me ask you: are you interested in Clinic having a more boilerplate-friendly macro processing mode, with templates or recycling old entries or something?  Or do you not care?  If it doesn't help you then I may as well not bother.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16612>
_______________________________________


More information about the Python-bugs-list mailing list