On Tue, 25 Sep 2012 07:44:04 -0700, Jayden wrote:New-style classes.
> In learning Python, I found there are two types of classes? Which one
> are widely used in new Python code?
> Is the new-style much better than old-style?Yes.
Always use new-style classes, unless you have some specific reason for
Advantages of new-style classes:
1) They are the future. In Python 3, all classes are "new-style" and
2) Multiple inheritance works correctly. Multiple inheritance for classic
3) New-style classes support awesome features like super(), properties,
The main disadvantage is that automatic delegation is a pain to do
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.