Title: typing.NamedTuple should add annotations to its constructor (__new__) parameters. · Issue #454 · python/typing · GitHub
Open Graph Title: typing.NamedTuple should add annotations to its constructor (__new__) parameters. · Issue #454 · python/typing
X Title: typing.NamedTuple should add annotations to its constructor (__new__) parameters. · Issue #454 · python/typing
Description: 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 ...
Open Graph Description: 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 comb...
X Description: 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 comb...
Opengraph URL: https://github.com/python/typing/issues/454
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"typing.NamedTuple should add annotations to its constructor (__new__) parameters.","articleBody":"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).\r\n\r\nHowever, 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.\r\n\r\nThus, I would like to propose setting the annotation of the Parameters in the Signature object as well.\r\n\r\n(Initially posted as http://bugs.python.org/issue31006.)","author":{"url":"https://github.com/anntzer","@type":"Person","name":"anntzer"},"datePublished":"2017-07-28T19:54:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/454/typing/issues/454"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c24b262e-6466-732a-fe68-e34c605e22b1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EAD2:3ED847:1839815:2386FF2:6A4E5585 |
| html-safe-nonce | 20cba7e8f75998f6683284cf204a4dd02f6c63715a64675e2a6aace71de44ae3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQUQyOjNFRDg0NzoxODM5ODE1OjIzODZGRjI6NkE0RTU1ODUiLCJ2aXNpdG9yX2lkIjoiNDcyODcyNjU1NDc5MTUzMTkwOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9fb18c4717dc323e293d42c379e18ec4543cd4c80f9df68b2b006266b1c5a10d |
| hovercard-subject-tag | issue:246444048 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/typing/454/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0ce7a088959be20fcfac041eebb80c84602b347197de52dd50e8406cda96043b/python/typing/issues/454 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0ce7a088959be20fcfac041eebb80c84602b347197de52dd50e8406cda96043b/python/typing/issues/454 |
| og:image:alt | 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 comb... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | anntzer |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/typing git https://github.com/python/typing.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 24604008 |
| octolytics-dimension-repository_nwo | python/typing |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24604008 |
| octolytics-dimension-repository_network_root_nwo | python/typing |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f344f1eab54fc7dfc02d0d018cda7e158c3db65c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width