At 07:27 PM 5/10/2007 -0400, Raymond Hettinger wrote:
>The PEP for eliminating __del__ seemed straight-forward at the 
>outset, but the use case you presented doesn't seem to have a clean 
>substitute (as it requires the object to be alive to finalize 
>it).  Other use cases do have a clean solution.  So, I'll go forward 
>with the PEP but am a bit disheartened that it is going to have to 
>advise try/finally or somesuch for the harder cases.

By the way - another issue with removing __del__ is that try/finally 
in generators (PEP 342) is implemented using it.

Which means that if you took away __del__ from the Python level, you 
could still simulate it by saving a reference to a running generator 
with a finally clause.  Of course, that would have at least as many 
problems as using __del__ directly, but there you go.  :)

_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to