Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Object-Oriented Python Instant Objects Methods

What is an instance of a class or method?

how do i establish one in a class and how do i use an instance?

1 Answer

Shay Paustovsky
Shay Paustovsky
969 Points

Hi Elisha,

What you're describing right now is part of the OOP Paradigm (Object-Oriented-Programming). Now I don't have experience in Python but I have in other OOP-languages.

Class - Imagine that you have a car: the car has properties (color, model, maker, etc..) and action it can take (drive, stop, turn engine, etc...) A class is simply a way to abstract those details.

Instance- Is simply the object, but unless you have assigned default values for properties in your object you will probably instantiate it i.e - make a copy of it and give it a name. later you can access it's properties and methods

Method- Is a fancy word for function, the only difference is that methods act on the properties inside an object and functions are global.

Hope this helped

HAPPY CODING

thank you!