Message382675
Some notes on needed TypedDict doc fixes.
https://docs.python.org/3/library/typing.html#typing.TypedDict
"class typing.TypedDict(dict)"
The actual signature from inspect.signature is "(typename, fields=None, /, *, total=True, **kwargs)". I presume fields not None and kwargs != {} are mutually exclusive. AFAIK, the kwargs version of the call alternative is not in PEP 589.
"The type info for introspection can be accessed via Point2D.__annotations__ and Point2D.__total__."
'__total__' is not indexed. __required_keys__ and __optional_keys__ are neither documented (including not in the PEP, which does not get revised) nor indexed. |
|
Date |
User |
Action |
Args |
2020-12-07 19:37:13 | terry.reedy | set | recipients:
+ terry.reedy, gvanrossum, pbryan, brandtbucher |
2020-12-07 19:37:13 | terry.reedy | set | messageid: <1607369833.63.0.367463388927.issue42592@roundup.psfhosted.org> |
2020-12-07 19:37:13 | terry.reedy | link | issue42592 messages |
2020-12-07 19:37:13 | terry.reedy | create | |
|