Kristján Valur Jónsson <krist...@ccpgames.com> added the comment:

Thanks for your comments Jim.
They made me realize that the patch was incomplete.  What is needed are two 
mutually exclusive flags that override the presence of the tp_del slot.  This 
addresses your 1) point and is the case for Generators.

I don't think 2 is important.  Does the context of the call matter?  It is 
merely a question of whether a finalizer will or will not do something trivial.

Finalizers implemented in python can never run from garbage collection.  the 
potential to do harm is simply too great.  Which is why these extensions are 
purely the domain of specialized C extensions.  Hence I don't think adding 
another slot, or allowing self-declared idempotent python finalizers to run 
during cleanup is a good idea.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9141>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to