Re: Opaque structures and Extension Types
Roberto Cavada <[email protected]> Thu, 15 May 2008 09:24:22 +0200
| Newsgroups | gmane.comp.python.pyrex |
|---|---|
| Organization | FBK |
| Message-ID | <[email protected]> |
Greg Ewing wrote: > I think you'll just have to initialise the struct in > __init__ rather than __cinit__, Documentation states that: """Under some circumstances it is possible for __init__ to be called more than once or not to be called at all, so your other methods should be designed to be robust in such situations.""" Now if I need to use __init__ I wonder what those 'some circumstances' are exactly, especially which are the cases when __init__ is not called at all. For deallocation, I've thought I can rely on __dealloc__ in root classes and exploit virtual destructors in my C structures. Thanks to all! r.