On 10/8/2013 9:31 PM, Benjamin Peterson wrote:
2013/10/8 Larry Hastings <la...@hastings.org>:
This PEP proposes a backwards-compatible syntax that should
permit implementing any builtin in pure Python code.

This is rather too strong. You can certainly implement them; you just
have to implement the argument parsing yourself. Python's
call/signature syntax is already extremely expressive, and resolving
call arguments to formal parameters is already a complicated (and
slow) process. Implementing functions with such strange argument
semantics is hardly common enough to justify the whole grouping syntax
proposed in this PEP. -1 to that. I think I can live with "/", but
YANGTNI still.

I am for having a way to succintly properly describe the signature of C in the manual and docstrings and help output. As it is now, the only safe thing to do, without trial and exception, is to assume positional only unless one knows otherwise.

But the syntax should only be as complicated as needed for 'most' C functions. If there are a few complicated oddballs, perhaps they could be simplified, or given a special-case explanation.

--
Terry Jan Reedy

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to