This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients Arfrever, Jim.Jewett, Trundle, alex, asvetlov, barry, bfroehle, chris.jerdonek, daniel.urban, david.villa, dmalcolm, eric.smith, ezio.melotti, gregory.p.smith, gvanrossum, jcea, jkloth, larry, mark.dickinson, ncoghlan, pitrou, skrah, v+python
Date 2013-02-16.13:47:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1361022467.42.0.394087911135.issue16612@psf.upfronthosting.co.za>
In-reply-to
Content
Stefan, that proposal definitely looks like it is worth writing up as a PEP to me. One thing that I particularly like about it is that it should be possible to pluck out the first element of the {} entries fairly easily in order to get the ordinary Python signature to feed to Cython or a "from string" constructor for signature objects.

As far as the "positional-only" parameters problem goes, at one point Guido was kicking around the idea of allowing "/" as a separator in Python function declarations to indicate positional only arguments. So the signature of a function that didn't accept keyword arguments at all would look like:

    def addch(x, y, ch, attr, /):
        ...

He eventually dropped it because positional only arguments (and the need to avoid colliding with arbitrary keyword arguments) are relatively rare in Python code, and using an inner function together with *args is a reasonable way to get decent error messages. However, as a way of concisely indicating positional-only arguments in the signature of *C* functions, the idea may be worth reconsidering.
History
Date User Action Args
2013-02-16 13:47:47ncoghlansetrecipients: + ncoghlan, gvanrossum, barry, gregory.p.smith, jcea, mark.dickinson, pitrou, larry, eric.smith, jkloth, ezio.melotti, Arfrever, v+python, alex, Trundle, asvetlov, skrah, dmalcolm, daniel.urban, chris.jerdonek, Jim.Jewett, bfroehle, david.villa
2013-02-16 13:47:47ncoghlansetmessageid: <1361022467.42.0.394087911135.issue16612@psf.upfronthosting.co.za>
2013-02-16 13:47:47ncoghlanlinkissue16612 messages
2013-02-16 13:47:47ncoghlancreate