[Python-Dev] [Python-checkins] peps: New DSL syntax and slightly changed semantics for the Argument Clinic DSL. (original) (raw)
Guido van Rossum guido at python.org
Mon Mar 18 19:02:49 CET 2013
- Previous message: [Python-Dev] [Python-checkins] peps: New DSL syntax and slightly changed semantics for the Argument Clinic DSL.
- Next message: [Python-Dev] [Python-checkins] peps: New DSL syntax and slightly changed semantics for the Argument Clinic DSL.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Mar 18, 2013 at 3:36 AM, Stefan Krah <stefan at bytereef.org> wrote:
Larry Hastings <larry at hastings.org> wrote:
* The DSL currently makes no provision for specifying per-parameter type annotations. This is something explicitly supported in Python; it should be supported for builtins too, once we have reflection support.
It seems to me that the syntax for parameter lines--dictated by Guido--suggests conversion functions are themselves type annotations. This makes intuitive sense. Really, did you read PEP 437? It's all in there.
This attitude is unhelpful. Please stop being outright hostile. If you want to have any influence on the outcome at all, consider looking into compromises.
But my thought experiments in how to convert the conversion function specification into a per-parameter type annotation ranged from obnoxious to toxic; I don't think that line of thinking will bear fruit. Did you look at the patch that I posted in issue #16612? It's already implemented: $ ./printsemant Tools/preprocess/testcases/posixstat.c PROGRAM[ SOURCE[...], DEFINE[ CNAME posixstat, SPEC[ DECLARATION { funfqname = os.stat, funname = stat, funcname = posixstat, funkind = Keywords, funparams = [ { paramname = path, paramtype = [bytes, int, str], <== here it is paramdefault = NONE, paramkind = (PosOrKwd, Required), paramconv = pathconverter, paramparseargs = [ ConvArg { argname = pathconverter, argtype = int (*converter)(PyObject *, void *) arguseptr = false }, MainArg { argname = path, argtype = patht, arguseptr = true }]}, [...]
I can assure you nobody downloaded your binaries. The security implications are just too scary.
-- --Guido van Rossum (python.org/~guido)
- Previous message: [Python-Dev] [Python-checkins] peps: New DSL syntax and slightly changed semantics for the Argument Clinic DSL.
- Next message: [Python-Dev] [Python-checkins] peps: New DSL syntax and slightly changed semantics for the Argument Clinic DSL.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]