Are all classes new-style classes in 2.4+?
- From: "Isaac Rodriguez" <isaac.rodriguez@xxxxxxxxxxx>
- Date: 31 Dec 2006 03:57:04 -0800
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.
.
- Follow-Ups:
- Re: Are all classes new-style classes in 2.4+?
- From: Steven D'Aprano
- Re: Are all classes new-style classes in 2.4+?
- From: Felipe Almeida Lessa
- Re: Are all classes new-style classes in 2.4+?
- From: Rene Fleschenberg
- Re: Are all classes new-style classes in 2.4+?
- From: Bjoern Schliessmann
- Re: Are all classes new-style classes in 2.4+?
- Prev by Date: Re: python , Boost and straight (but complex) C code
- Next by Date: Re: PEP 3107 Function Annotations for review and comment
- Previous by thread: Question concerning this list
- Next by thread: Re: Are all classes new-style classes in 2.4+?
- Index(es):
Relevant Pages
|