On Jan 17, 2008 6:15 AM, Andy Cheesman <[EMAIL PROTECTED]> wrote: > My only arising question is why should i > "derive from object, so that you get a new-style class." >
This list discussed this topic a couple of weeks ago. Recklessly simplifying, it boils down to this: By using new-style classes, your objects inherit a number of pre-defined methods and properties which you would otherwise have to write yourself. Ceteris paribus, a new-style class takes up less memory than the equivalent old-style class (there was some wild surmise about why that should be, but it's not important now.) Finally, it appears that Python 3000 will require new-style classes, so you might as well get used to them now. For your program, the only difference is that instead of defining a class like this: class Thingy(): pass you would write this: class Thingy(object): pass Not much downside, I'd say. -- www.fsrtechnologies.com
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor