Hi Valentine,

On 25 August 2015 at 09:56, Valentine Sinitsyn
<valentine.sinit...@gmail.com> wrote:
>> Yes, I think so.  There is a *highly obscure* corner case: __del__
>> will still be called several times if you declare your class with
>> "__slots__=()".
>
> Even on "post-PEP-0442" Python 3.4+? Could you share a link please?

class X(object):
    __slots__=()     # <= try with and without this
    def __del__(self):
        global revive
        revive = self
        print("hi")

X()
revive = None
revive = None
revive = None


--Armin
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to