
March 12, 2020
10:56 p.m.
On 13/03/20 4:02 am, Eric Wieser wrote:
For consistency, `x = (del foo.attr)` and `x = (del foo[i])` could also become legal expressions, and `__delete__`, `__delattr__`, and `__delitem__` would now have return values. Existing types would be free to continue to return `None`.
That would mean you couldn't rely on 'del foo.attr' or 'del foo[item]' doing what you expect, unless you know for sure you're dealing with a type that's been updated to follow the new semantics. -- Greg