Paul Rubin wrote:
Richard Damon <rich...@damon-family.org> writes:
a class to define member functions like __ref__
and __unref__ (or perhaps some other name) that if defined, would be
called every time a name was bound or unbound to an object?
That sounds horrendous and wouldn't handle the case of a list element
creating a reference without binding a name.
To be any use, they would have to be called any time the
reference count changes, which happens *very* frequently --
so massive overhead.
There's also a logical problem. Calling __ref__ would
itself involve adding at least one reference to the object
temporarily, thus requiring __ref__ to be called, which
would...
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list