Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 46401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:57:36+00:00 2026-05-10T15:57:36+00:00

What is the difference between old style and new style classes in Python? When

  • 0

What is the difference between old style and new style classes in Python? When should I use one or the other?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T15:57:37+00:00Added an answer on May 10, 2026 at 3:57 pm

    From New-style and classic classes:

    Up to Python 2.1, old-style classes were the only flavour available to the user.

    The concept of (old-style) class is unrelated to the concept of type: if x is an instance of an old-style class, then x.__class__ designates the class of x, but type(x) is always <type 'instance'>.

    This reflects the fact that all old-style instances, independently of their class, are implemented with a single built-in type, called instance.

    New-style classes were introduced in Python 2.2 to unify the concepts of class and type. A new-style class is simply a user-defined type, no more, no less.

    If x is an instance of a new-style class, then type(x) is typically the same as x.__class__ (although this is not guaranteed – a new-style class instance is permitted to override the value returned for x.__class__).

    The major motivation for introducing new-style classes is to provide a unified object model with a full meta-model.

    It also has a number of immediate benefits, like the ability to subclass most built-in types, or the introduction of ‘descriptors’, which enable computed properties.

    For compatibility reasons, classes are still old-style by default.

    New-style classes are created by specifying another new-style class (i.e. a type) as a parent class, or the ‘top-level type’ object if no other parent is needed.

    The behaviour of new-style classes differs from that of old-style classes in a number of important details in addition to what type returns.

    Some of these changes are fundamental to the new object model, like the way special methods are invoked. Others are ‘fixes’ that could not be implemented before for compatibility concerns, like the method resolution order in case of multiple inheritance.

    Python 3 only has new-style classes.

    No matter if you subclass from object or not, classes are new-style in Python 3.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 89k
  • Answers 89k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer One easy way is to create a new image of… May 11, 2026 at 5:55 pm
  • Editorial Team
    Editorial Team added an answer Yes you can use WF. You will need to write… May 11, 2026 at 5:55 pm
  • Editorial Team
    Editorial Team added an answer Are you sure you can hit that URL from your… May 11, 2026 at 5:55 pm

Related Questions

Setup using a simple example: I've got 1 table ( Totals ) that holds
I got into a mini-argument with my boss recently regarding project failure. After three
I get the need to clean up resources during the teardown of an object,
I have several ASP:TextBox controls on a form (about 20). When the form loads,

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.