[Python-Dev] Adding a scarier warning to object.__del__?

2019-12-31 Thread Yonatan Zunger
Hey everyone, I just encountered yet another reason to beware of __del__: when it's called during interpreter shutdown, for reasons which are kind of obvious in retrospect, if it calls notify() on a threading.Condition, the waiting thread may or may not ever actually receive it, and so if it does

[Python-Dev] Re: PEP 558: Defined semantics for locals() (December 2019 edition)

2019-12-31 Thread Yonatan Zunger
Thanks for writing this up, Nick! My main question is about the remaining difference between semantics at the class/module versus function level: is it worth the additional cognitive complexity to have the class/module behavior be different from the function behavior? The "mutable" class/module b