Re: __init__ vs. __del__

2009-03-22 Thread David Stanek
2009/3/21 Randy Turner rtms...@yahoo.com: There are a number of use-cases for object cleanup that are not covered by a generic garbage collector... For instance, if an object is caching data that needs to be flushed to some persistent resource, then the GC has no idea about this. It seems

__init__ vs. __del__

2009-03-21 Thread Randy Turner
Hi, I was reading a book on Python-3 programming recently and the book stated that, while there is an __init__ method for initializing objects, there was a __del__ method but the __del__ method is not guaranteed to be called when an object is destroyed. If there is code in the __init__ method

Re: __init__ vs. __del__

2009-03-21 Thread alex goretoy
__init__ is the object construction(initialization) faze __del__ is the object destruction faze, I think GC also happens, not sure -Alex Goretoy http://www.goretoy.com -- http://mail.python.org/mailman/listinfo/python-list

Re: __init__ vs. __del__

2009-03-21 Thread Christian Heimes
Randy Turner wrote: I was reading a book on Python-3 programming recently and the book stated that, while there is an __init__ method for initializing objects, there was a __del__ method but the __del__ method is not guaranteed to be called when an object is destroyed. If there is code

Re: __init__ vs. __del__

2009-03-21 Thread Paul McGuire
On Mar 21, 8:37 pm, Christian Heimes li...@cheimes.de wrote: Randy Turner wrote: I was reading a book on Python-3 programming recently and the book stated that, while there is an __init__ method for initializing objects, there was a __del__ method but the __del__ method is not guaranteed

Re: __init__ vs. __del__

2009-03-21 Thread Albert Hopkins
On Sat, 2009-03-21 at 17:41 -0700, Randy Turner wrote: Hi, I was reading a book on Python-3 programming recently and the book stated that, while there is an __init__ method for initializing objects, there was a __del__ method but the __del__ method is not guaranteed to be called when an

Re: __init__ vs. __del__

2009-03-21 Thread Randy Turner
Subject: Re: __init__ vs. __del__ On Sat, 2009-03-21 at 17:41 -0700, Randy Turner wrote: Hi, I was reading a book on Python-3 programming recently and the book stated that, while there is an __init__ method for initializing objects, there was a __del__ method but the __del__ method