__del__ methods

Robert Rawlins robert.rawlins at thinkbluemedia.co.uk
Sun Jul 20 06:33:07 EDT 2008


> In Python 2.x, "classic" classes (which are not part of the unified
> type hierarchy) are deprecated, and exist only for backward
> compatibility with old code.
>
> You need to create "new-style" classes
> <URL:http://www.python.org/doc/newstyle/> by inheriting from some
> class that is part of the unified type hierarchy; if there is no
> obvious candidate, 'object' is the recommended choice.

Thanks Ben,

This isn’t something I'd seen before (god that makes me feel stupid). I've always based my code off the odd example that's dotted around and hadn’t ever done any proper reading on these new type classes.

I've done a little reading this morning and really love a great deal of the concepts, I'll be upgrading my app to this spec in the next few days.

Robert




More information about the Python-list mailing list