Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue39572

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:[typing] TypedDict's 'total' argument is undocumented
Type:Stage:resolved
Components:DocumentationVersions:Python 3.9, Python 3.8
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: docs@pythonNosy List: Ananthakrishnan, brett.cannon, docs@python, gvanrossum, levkivskyi, miss-islington, python-dev
Priority:normalKeywords:easy, patch

Created on2020-02-06 20:08 bybrett.cannon, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 18554mergedAnanthakrishnan,2020-02-18 18:21
PR 18556mergedmiss-islington,2020-02-19 05:06
PR 24999mergedpython-dev,2021-03-23 19:23
PR 25545mergedmiss-islington,2021-04-23 00:35
Messages (12)
msg361503 -(view)Author: Brett Cannon (brett.cannon)*(Python committer)Date: 2020-02-06 20:07
The docs mention __total__, but there's no mention of how to actually set that attribute, nor what it actually represents.P.S.https://github.com/python/cpython/blob/master/Lib/typing.py#L16 says TypedDict "may be added soon"; I think that's outdated. ;)
msg362228 -(view)Author: Ananthakrishnan (Ananthakrishnan)*Date: 2020-02-18 17:05
https://stackoverflow.com/questions/58427394/what-is-the-meaning-of-total-dunder-attribute-in-python-3questions about this.
msg362229 -(view)Author: Ananthakrishnan (Ananthakrishnan)*Date: 2020-02-18 17:49
It will be usefull if we document _total_ argument also.
msg362231 -(view)Author: Guido van Rossum (gvanrossum)*(Python committer)Date: 2020-02-18 18:17
There's no __total__ argument, but there is a __total__ attribute. There are also (new in 3.9) __required_keys__ and __total_keys__ attributes.Are you interested in submitting a PR with the needed doc changes?
msg362232 -(view)Author: Ananthakrishnan (Ananthakrishnan)*Date: 2020-02-18 18:19
yes,I'm interested.
msg362247 -(view)Author: Guido van Rossum (gvanrossum)*(Python committer)Date: 2020-02-19 04:33
New changesetab6423fe2de0ed5f8a0dc86a9c7070229326b0f0 by ananthan-123 in branch 'master':bpo-39572: Document ’total’ flag of TypedDict (GH-18554)https://github.com/python/cpython/commit/ab6423fe2de0ed5f8a0dc86a9c7070229326b0f0
msg362251 -(view)Author: miss-islington (miss-islington)Date: 2020-02-19 05:24
New changeset44c690112d96a81fe02433de7900a4f8f9457012 by Miss Islington (bot) in branch '3.8':bpo-39572: Document ’total’ flag of TypedDict (GH-18554)https://github.com/python/cpython/commit/44c690112d96a81fe02433de7900a4f8f9457012
msg362252 -(view)Author: Guido van Rossum (gvanrossum)*(Python committer)Date: 2020-02-19 05:28
Separately, would you also be interested in writing docs for the `__total__` class attribute of TypedDict subclasses (3.8 and 3.9) and for the `__required_keys__` and `__total_keys__` attributes (only in 3.9)? (Sorry, there's no document you can crib these from. :-)
msg362262 -(view)Author: Ananthakrishnan (Ananthakrishnan)*Date: 2020-02-19 10:30
yes,I'm interested in writing docs for the `__required_keys__` and `__total_keys__` attributes.
msg362276 -(view)Author: Guido van Rossum (gvanrossum)*(Python committer)Date: 2020-02-19 14:57
Go for it. Use the same bug number.On Wed, Feb 19, 2020 at 02:30 Ananthakrishnan <report@bugs.python.org>wrote:>> Ananthakrishnan <ananthakrishnan15.2001@gmail.com> added the comment:>> yes,I'm interested in writing docs for the `__required_keys__` and> `__total_keys__` attributes.>> ---------->> _______________________________________> Python tracker <report@bugs.python.org>> <https://bugs.python.org/issue39572>> _______________________________________>-- --Guido (mobile)
msg391643 -(view)Author: miss-islington (miss-islington)Date: 2021-04-23 00:35
New changeset6afb0a8078ff3fc93adc4177565c56f820ca2880 by Simon Charette in branch 'master':bpo-39572: Address typo in CHANGELOG. (GH-24999)https://github.com/python/cpython/commit/6afb0a8078ff3fc93adc4177565c56f820ca2880
msg391645 -(view)Author: miss-islington (miss-islington)Date: 2021-04-23 00:58
New changesetbc5a1a7adf0d0154cb3f247da84146dd51997540 by Miss Islington (bot) in branch '3.9':bpo-39572: Address typo in CHANGELOG. (GH-24999)https://github.com/python/cpython/commit/bc5a1a7adf0d0154cb3f247da84146dd51997540
History
DateUserActionArgs
2022-04-11 14:59:26adminsetgithub: 83753
2021-04-23 00:58:50miss-islingtonsetmessages: +msg391645
2021-04-23 00:35:39miss-islingtonsetpull_requests: +pull_request24269
2021-04-23 00:35:30miss-islingtonsetmessages: +msg391643
2021-03-23 19:23:01python-devsetnosy: +python-dev

pull_requests: +pull_request23757
2020-02-19 14:57:29gvanrossumsetmessages: +msg362276
2020-02-19 10:30:36Ananthakrishnansetmessages: +msg362262
2020-02-19 05:28:20gvanrossumsetstatus: open -> closed
resolution: fixed
messages: +msg362252

stage: patch review -> resolved
2020-02-19 05:24:57miss-islingtonsetnosy: +miss-islington
messages: +msg362251
2020-02-19 05:06:05miss-islingtonsetpull_requests: +pull_request17936
2020-02-19 04:33:13gvanrossumsetmessages: +msg362247
2020-02-18 18:21:44Ananthakrishnansetkeywords: +patch
stage: needs patch -> patch review
pull_requests: +pull_request17935
2020-02-18 18:19:10Ananthakrishnansetmessages: +msg362232
2020-02-18 18:17:37gvanrossumsetmessages: +msg362231
2020-02-18 17:49:03Ananthakrishnansetmessages: +msg362229
2020-02-18 17:31:56gvanrossumsetkeywords: +easy
2020-02-18 17:05:42Ananthakrishnansetnosy: +Ananthakrishnan
messages: +msg362228
2020-02-06 20:08:00brett.cannoncreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp