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 serhiy.storchaka
Recipients larry, martin.panter, serhiy.storchaka
Date 2016-02-03.21:44:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Currently extension functions either accept only positional-only arguments (PyArg_ParseTuple), or keyword arguments (PyArg_ParseTupleAndKeywords). While adding support passing by keywords looks good for some arguments, for other arguments it doesn't make much sense. For example "encoding" and "errors" arguments for str or "base" argument for int are examples of good keyword arguments, but it is hard to choose good name for the first argument.

I suggest to allow to add the support of keyword arguments only for the part of arguments, while left other arguments positional-only. This issue consists from two stages:

1. Allow PyArg_ParseTupleAndKeywords to accept empty string "" as keywords and interpret this as positional-only argument.

2. Make Argument Clinic to generate code for partial keyword arguments. The syntax already supports this: "/" separates positional-only arguments from keyword arguments.
Date User Action Args
2016-02-03 21:44:17serhiy.storchakasetrecipients: + serhiy.storchaka, larry, martin.panter
2016-02-03 21:44:16serhiy.storchakasetmessageid: <>
2016-02-03 21:44:16serhiy.storchakalinkissue26282 messages
2016-02-03 21:44:16serhiy.storchakacreate