Re: __init__ vs. __del__

2009-03-22 Thread David Stanek
2009/3/21 Randy Turner : > 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 to be

Re: __init__ vs. __del__

2009-03-21 Thread Randy Turner
-list@python.org Sent: Saturday, March 21, 2009 6:45:20 PM 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

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 whe

Re: __init__ vs. __del__

2009-03-21 Thread Paul McGuire
On Mar 21, 8:37 pm, Christian Heimes 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 to be call

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 c

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

__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