On Mon, Jun 18, 2018 at 6:52 AM, Jelle Zijlstra <jelle.zijls...@gmail.com> wrote: > > > 2018-06-17 13:09 GMT-07:00 Chris Angelico <ros...@gmail.com>: >> >> >> kwargs.pop("some_key") could plausibly be spelled del >> kwargs["some_key"] if del were (like yield) upgraded to expression. >> Whether that is an improvement or not, I don't know, but at least it's >> logical. > > That already works. It calls the __delitem__ magic method. >
Yes, but it's a statement. The point of kwargs.pop("some_key") is to get the value of it. x = del kwargs["some_key"] # doesn't work ChrisA _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/