Are all classes new-style classes in 2.4+?

Isaac Rodriguez isaac.rodriguez at comcast.net
Sun Dec 31 06:57:04 EST 2006


Hi,

This is probably a very basic question, but I've been playing with new
style classes, and I cannot see any difference in behavior when a
declare a class as:

class NewStyleClass(object):

or

class NewStyleClass:

I declare property members in both and it seems to work the exact same
way. I am using Python 2.4, and I was wondering if by default, all
classes are assumed to be derived from "object". If not, can someone
point me to some place where I can learn more about new-style classes
and their advantages? All the documentation I've found is very vague.

Thanks,

- Isaac.




More information about the Python-list mailing list