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 brett.cannon, larry, ncoghlan, serhiy.storchaka, taleinat, vstinner, yselivanov
Date 2017-11-04.13:27:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1509802033.5.0.213398074469.issue31939@psf.upfronthosting.co.za>
In-reply-to
Content
Argument Clinic doesn't have any relations to annotations. It is just by accident use the syntax similar to the syntax  of annotations in its declarations (and actually use Python parser for parsing them as anotations, but this is an implementation detail). It doesn't set argument annotations in signatures.

For example, chr() is declared with:

/*[clinic input]
chr as builtin_chr

    i: int
    /

Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff.
[clinic start generated code]*/

Argument Clinic generates:

PyDoc_STRVAR(builtin_chr__doc__,
"chr($module, i, /)\n"
"--\n"
"\n"
"Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff.");

I think it could be possible to make Argument Clinic generating argument annotations basing on the accepted by converters types, but we are far from this.
History
Date User Action Args
2017-11-04 13:27:13serhiy.storchakasetrecipients: + serhiy.storchaka, brett.cannon, ncoghlan, vstinner, taleinat, larry, yselivanov
2017-11-04 13:27:13serhiy.storchakasetmessageid: <1509802033.5.0.213398074469.issue31939@psf.upfronthosting.co.za>
2017-11-04 13:27:13serhiy.storchakalinkissue31939 messages
2017-11-04 13:27:13serhiy.storchakacreate