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 227653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:37:00+00:00 2026-05-11T19:37:00+00:00

I have read several documentation already but the definition of class and instance didnt

  • 0

I have read several documentation already but the definition of “class” and “instance” didnt get really clear for me yet.

Looks like that “class” is like a combination of functions or methods that return some result is that correct? And how about the instance? I read that you work with the class you creat trough the instance but wouldnt be easier to just work direct with the class?

Sometimes geting the concepts of the language is harder than working with it.

  • 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. Editorial Team
    Editorial Team
    2026-05-11T19:37:00+00:00Added an answer on May 11, 2026 at 7:37 pm

    Your question is really rather broad as classes and instances/objects are vital parts of object-oriented programming, so this is not really Python specific. I recommend you buy some books on this as, while initially basic, it can get pretty in-depth. In essense, however:

    The most popular and developed model of OOP is a class-based model, as opposed to an object-based model. In this model, objects are entities that combine state (i.e., data), behavior (i.e., procedures, or methods) and identity (unique existence among all other objects). The structure and behavior of an object are defined by a class, which is a definition, or blueprint, of all objects of a specific type. An object must be explicitly created based on a class and an object thus created is considered to be an instance of that class. An object is similar to a structure, with the addition of method pointers, member access control, and an implicit data member which locates instances of the class (i.e. actual objects of that class) in the class hierarchy (essential for runtime inheritance features).

    So you would, for example, define a Dog class, and create instances of particular dogs:

    >>> class Dog():
    ...     def __init__(self, name, breed):
    ...             self.name = name
    ...             self.breed = breed
    ...     def talk(self):
    ...             print "Hi, my name is " + self.name + ", I am a " + self.breed
    ...
    >>> skip = Dog('Skip','Bulldog')
    >>> spot = Dog('Spot','Dalmatian')
    >>> spot.talk()
    Hi, my name is Spot, I am a Dalmatian
    >>> skip.talk()
    Hi, my name is Skip, I am a Bulldog
    

    While this example is silly, you can then start seeing how you might define a Client class that sets a blueprint for what a Client is, has methods to perform actions on a particular client, then manipulate a particular instance of a client by creating an object and calling these methods in that context.

    Sometimes, however, you have methods of a class that don’t really make sense being accessed through an instance of the class, but more from the class itself. These are known as static methods.

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

Sidebar

Related Questions

I do not fully understand classes. I have read the python documentation and several
I have read several post on both matters but I haven't seen anyone comparing
I have read several questions regarding this but I fear they may be out
I have read several posts about the configuration manager in VS2010 (or before) but
I have read that you can do it, but would this really improve performance
I've read several of the posts on stack overflow already about this topic, but
I completed the StockWatcher basic gwt tutorial, and read several pages of documentation but
I have read the documentation and several websites on exactly how to do this,
I have read in several places that it's possible to share the objects directory
I have a directory with several .html files. Would like to read the list

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.