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 Antony.Lee
Recipients Antony.Lee
Date 2017-07-24.09:07:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1500887267.27.0.393959457135.issue31006@psf.upfronthosting.co.za>
In-reply-to
Content
Currently, the fields, types and defaults used to define a typing.NamedTuple need to be retrieved from three different attributes: `_fields`, `_field_types`, and `_field_defaults` (the first two are combined in `__annotations__`, but that still misses the defaults).

However, there is a place where all this information can be naturally combined: in the Signature of the constructor (as returned by `inspect.signature(cls)`).  Currently, the Parameter objects in the signature have the information about the parameter names and defaults, but their annotation is not set.

Thus, I would like to propose setting the annotation of the Parameters in the Signature object as well.
History
Date User Action Args
2017-07-24 09:07:47Antony.Leesetrecipients: + Antony.Lee
2017-07-24 09:07:47Antony.Leesetmessageid: <1500887267.27.0.393959457135.issue31006@psf.upfronthosting.co.za>
2017-07-24 09:07:47Antony.Leelinkissue31006 messages
2017-07-24 09:07:46Antony.Leecreate