[patch] tiny documentation fix

Andrew Bennetts andrew at canonical.com
Wed Nov 2 23:13:20 GMT 2005


On Wed, Nov 02, 2005 at 01:59:32PM -0800, Robey Pointer wrote:
[...]
> >
> >"differently from other languages" would be okay, but I don't believe
> >"diffenently from in other" is correct.
> 
> This whole paragraph smells bad to me.  Python destructors actually  
> behave differently from other languages in that they may be called  
> *immediately* after the last reference goes away, or may not be  
> called at all.  (Destructors of objects inside cycles are never  
> called.)  I can't offhand think of the restrictions being referred to.

One restriction that springs to mind is that if a __del__ is invoked during
the python interpreter's shutdown phase, lots of globals and modules the
__del__ may expect to find won't be there.

-Andrew.





More information about the bazaar mailing list