super not working in __del__ ?

Duncan Booth duncan.booth at invalid.invalid
Wed Feb 16 04:55:28 EST 2005


Ola Natvig wrote:

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

There was one, but for some reason you trimmed it out of your quote:

The original code before you trimmed it was:

>>>> class B(A):
> 	def __del__(self):
> 		print "B.__del__"
> 		super(self.__class__, self).__del__()




More information about the Python-list mailing list