June 17, 2018
9 p.m.
On Mon, Jun 18, 2018 at 6:52 AM, Jelle Zijlstra <jelle.zijlstra@gmail.com> wrote:
2018-06-17 13:09 GMT-07:00 Chris Angelico <rosuav@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