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
-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
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
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
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
__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
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