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 larry
Recipients larry, rhettinger, serhiy.storchaka, vstinner, yselivanov
Date 2019-03-15.18:52:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1552675939.93.0.454101439298.issue29299@roundup.psfhosted.org>
In-reply-to
Content
Argument Clinic can currently only generate signatures for functions whose signatures can be represented in Python.  This is because the signatures are parsed by the inspect module, which in turn uses the ast module to generate a parse tree; it then examines the parse tree and uses that to generate the Signature object.

(By the time you see a signature of a function using inspect, the signature has actually made a round-trip through the ast module, been turned into a Signature object, then str() has been run on it to re-generate the text representation from scratch.  The fact that it's usually identical to the original text signature buried in the function's docstring is a happy accident.)

Changing Argument Clinic to generate signatures with square brackets in them to signify optional parameters is insufficient.  You'd also have to upgrade inspect to support this new syntax--otherwise there'd be no point.  And *that* would be a lot of code.
History
Date User Action Args
2019-03-15 18:52:19larrysetrecipients: + larry, rhettinger, vstinner, serhiy.storchaka, yselivanov
2019-03-15 18:52:19larrysetmessageid: <1552675939.93.0.454101439298.issue29299@roundup.psfhosted.org>
2019-03-15 18:52:19larrylinkissue29299 messages
2019-03-15 18:52:19larrycreate