I
Isaac Rodriguez
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.
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.