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 <la...@hastings.org> 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? > > > Thanks, > > > /arry -- Kind regards, Stefano Borini _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/R2WISH5AJHNIUPVTFXFCTN7E2IIIBKHR/ Code of Conduct: http://python.org/psf/codeofconduct/