[Pyrex] special methods

Greg Ewing greg at cosc.canterbury.ac.nz
Wed Nov 12 05:07:40 CET 2003


Bryan Weingarten <bryan.weingarten at pobox.com>:

> the doc says that __del__ will 
> get called before __dealloc__.  but i can't get it to be called
> on 
> the same page in the table below, i noticed that __del__ is not 
> included, so i wonder if __del__ is really a special method for
> types. 

Hmmm. I can't recall whether I've actually tested this. It's
true that there's no slot in the type object for __del__, but
I always thought that if an ordinary method called __del__
existed, it would be called at the appropriate time. It may
be that this is only true for Python classes, however. I'll
look into this.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+




More information about the Pyrex mailing list