| ▲ | mrweasel 2 days ago | ||||||||||||||||
Okay so basically just "inline":
or infer the type hint in:
It should probably be something like:
where typing.Const defaults to Any for an empty dict. | |||||||||||||||||
| ▲ | codethief 2 days ago | parent [-] | ||||||||||||||||
Not sure we're talking about the same thing. Inline TypedDicts are already in the process of being formalized, see https://peps.python.org/pep-0764/ , and have experimental support in e.g. Pyright. What I meant was that
should be inferred as | |||||||||||||||||
| |||||||||||||||||