does python have useless destructors?

Roger Binns rogerb at rogerbinns.com
Fri Jun 18 14:21:01 EDT 2004


David Turner wrote:
> The most obvious way in which RAII can be enabled is by introducing
> defined reference-counting semantics for objects with __del__.  I
> can't think of another way of doing it off-hand, but there must be
> others (if reference counting has unacceptably high overhead).

I would be quite happy to get an exception or equivalent when
a situation arises that the GC can't handle.  I would consider
it a bug in my code or design and something I should fix, and
consequently would want to know about it.  Other people's opinion
may differ (tm).

Roger





More information about the Python-list mailing list