Aahz wrote: >> Did you actually read my posts where I have shown some legitimate use >> cases of __del__ which can't be substituted with short and elegant >> enough code? > > The question is whether those use cases are frequent enough -- > especially for less-than-wizard programmers -- to warrant keeping > __del__ around.
What I am basically against is the need of removing an easy syntax which can have problematic side effects if you are not adult enough, in favor of a complicated library workaround which requires deeper knowledge of Python (weakrefs, lambdas, early binding of default arguments, just to name three), and can cause side effects just as bad if you are not adult enough. Where's the trade-off? On the other hand, __close__ (out-of-order, recallable __del__) fixes some issues of __del__, it is easy to teach and understand, it is easy to write. And, if we could (optionally) raise a RuntimeError as soon an object with __del__ enters a loop, would your opinion about it be different? Giovanni Bajo _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
