New submission from Jelle Zijlstra <jelle.zijls...@gmail.com>:
https://docs.python.org/3.10/library/typing.html#typing.TypedDict It says: > To allow using this feature with older versions of Python that do not support > PEP 526, TypedDict supports two additional equivalent syntactic forms But there is another reason to use the equivalent forms: if your keys aren't valid Python names. There's an example in typeshed that uses "in" (a keyword) as a TypedDict key, and I've seen others with keys that have hyphens in them. Also: - The docs mention attributes like `__required_keys__`, but don't clearly say what is in these attributes. We should document them explicitly with the standard syntax for attributes. - There is no mention of one TypedDict inheriting from another. ---------- assignee: docs@python components: Documentation messages: 412784 nosy: 97littleleaf11, AlexWaygood, Jelle Zijlstra, docs@python, sobolevn priority: normal severity: normal status: open title: TypedDict docs are incomplete versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46677> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com