super not working in __del__ ?
Ola Natvig
ola.natvig at infosense.no
Wed Feb 16 04:33:05 EST 2005
Duncan Booth wrote:
> Fredrik Lundh wrote:
>
>
>>in this case,
>>
>> def __del__(self):
>> super(self.__class__, self).__del__()
>>
>>should do the trick.
>
>
> Only if nobody ever tries to subclass your class, and if they aren't going
> to subclass it why bother to use super in the first place.
>
>
>>>>class Base(object):
>
> def __del__(self):
There should be a super(self.__class__, self)._del__() here if I'm not
totaly wong, which could be the case here ;)
> print "Base.__del__"
>
>
--
--------------------------------------
Ola Natvig <ola.natvig at infosense.no>
infoSense AS / development
More information about the Python-list
mailing list