|
Extension types can't have __del__ methods after all: msg#00050python.pyrex
Bryan Weingarten <bryan.weingarten@xxxxxxxxx> wrote: > i've read the docs on special methods in the extensions type > section, but i'm having trouble with this one. 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. I've just got around to checking this out. It seems I made an assumption early on that this would work, but never actually tried it out. It turns out that it doesn't work. I think __del__ methods only apply to user-defined types. So you'll just have to do whatever you were going to do in the __del__ method in the __dealloc__ method instead. Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg@xxxxxxxxxxxxxxxxxxxxx +--------------------------------------+ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Quick 'len()' speedup for Pyrex: 00050, Phillip J. Eby |
|---|---|
| Next by Date: | (no subject): 00050, Patrick Maupin |
| Previous by Thread: | Quick 'len()' speedup for Pyrexi: 00050, Phillip J. Eby |
| Next by Thread: | (no subject): 00050, Patrick Maupin |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |