On 4/1/06, Thomas Wouters <[EMAIL PROTECTED]> wrote:
Eh, that would mean the attribute would have to be called '__notfinalized__' of course ;)
-- On 4/1/06, Jim Jewett < [EMAIL PROTECTED]> wrote:Nick Coghlan
> A simple Boolean attribute (e.g. __finalized__) should be enough. ...
> If it's both present and true, the GC can ignore the finaliser on that instance
That doesn't really take care of resource release, which needs to be
called, and called early.(And the name will sound odd if it holds
resources only sometimes, so that it has to flip the __finalized__
attribute.)
Well, I don't want to sound too gross, but any such class could store its resources *in* __finalized__, leaving it an empty container when there is no resource to release.
Eh, that would mean the attribute would have to be called '__notfinalized__' of course ;)
Thomas Wouters <[EMAIL PROTECTED] >
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com