[Python-Dev] PEP 457: Syntax For Positional-Only Parameters

Larry Hastings larry at hastings.org
Wed Oct 9 17:07:08 CEST 2013


On 10/09/2013 04:38 PM, Paul Moore wrote:
> For that matter, why does the syntax used by Argument Clinic have to
> be the same as whatever future syntax is used in Python? If indeed,
> any ever is? What benefit do we get given the cost (rushing in a
> syntax that nobody is actually convinced we even need in Python yet).
>
> In other words, why does PEP this need to be separated out from the
> Argument Clinic PEP at all?

I propose to use this syntax in three places:

 1. As input to Argument Clinic.
 2. As input to the Python C API, to express the metadata for builtins.
 3. As the first line of output of pydoc (aka "help()") when reviewing a
    function.

Of these, 3 is visible to users.  Theoretically all of them could use 
different syntaxes.  But consistency is desirable, so it would be better 
if these syntaxes were as similar as possible.  Python syntax works well 
for all three syntaxes, except it does not support positional-only 
parameters.  It seemed reasonable to codify twenty-year old practice in 
a syntax extension that I could use in all of the above.


//arry/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20131009/1a044418/attachment.html>


More information about the Python-Dev mailing list