Yes. It's already supported in the branch. You can do MyType[whatever=5]. One could possibly change dict to allow both the specification dict[str, int] and dict[key=str, value=int], but this specific change of the dict class is not part of the implementation nor the PEP (nor I expect it to happen, for what matters, and I would not request it).
On Sat, 6 Feb 2021 at 11:10, Larry Hastings email@example.com wrote:
On 2/5/21 4:25 PM, Stefano Borini wrote:
dicts and lists will keep working as before. They will not support keyword arguments (probably ever, as there is no clear semantic for them) and the current implementation simply throws an error if the user tries to.
Is the plan to add PEP 637 support to type objects, so they allow constructing type hints using named parameters, as suggested in the PEP?