On Fri, 23 Oct 2020 at 10:18, Marco Sulla <[email protected]> wrote: > > On Fri, 23 Oct 2020 at 09:39, Steven D'Aprano <[email protected]> wrote: >> >> Using PEP 634 syntax, I could write: >> >> >> def method(self, **kwargs): >> {'spam': spam, 'eggs': eggs, **kw} = **kwargs >> process(spam, eggs) >> super().method(**kw) > > > I like that.
Comparing it to the pattern matching version Steven showed just before this in his post, I don't see enough additional benefit over the pattern matching version to justify needing a second way to do it. So I'd say this is covered just fine by pattern matching, and there's no need for a dict unpacking syntax as well. (Yes, I know we'll have list patterns and list unpacking, and I don't advocate removing list unpacking because there's a pattern matching variant. But we've lived without dict unpacking for a long time, so unlike lists I think the pattern matching version is enough). Paul _______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/ITHD27VMM75UCMGNGKN4TNNZ666PVNTJ/ Code of Conduct: http://python.org/psf/codeofconduct/
