Re: Are all classes new-style classes in 2.4+?
- From: Rene Fleschenberg <rene@xxxxxxxxxxxxxx>
- Date: Sun, 31 Dec 2006 13:53:08 +0100
Isaac Rodriguez wrote:
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".
No, they are not. It's just that the "basic functionality" seems to work
the same at first glance (i.e. you don't need to learn alot of new
syntax in order to switch from old-style to new-style classes).
Play around with things like dir() and type() on old-style and new-style
classes, and you will soon see differences.
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.
http://www.python.org/download/releases/2.2.3/descrintro/
http://www.cafepy.com/article/python_types_and_objects/python_types_and_objects.html
--
René
OpenPGP key id: 0x63B1F5DB
JID: rene.fleschenberg@xxxxxxxxxxxxx
Attachment:
signature.asc
Description: OpenPGP digital signature
- References:
- Are all classes new-style classes in 2.4+?
- From: Isaac Rodriguez
- Are all classes new-style classes in 2.4+?
- Prev by Date: Re: Are all classes new-style classes in 2.4+?
- Next by Date: Re: Question concerning this list [WebCrawler]
- Previous by thread: Re: Are all classes new-style classes in 2.4+?
- Next by thread: Re: Are all classes new-style classes in 2.4+?
- Index(es):
Relevant Pages
|