Lesson 14 of 20 · about 15 min
Objects and classes, deeper
An object bundles state with the functions that change it. Class attributes are shared by every instance, instance attributes belong to one object, and methods are just functions that get the object as self.
🔓 Unlock this lesson
This lesson is part of the DoingCamp Pass. Members get every lesson in every course, with all the interactive visuals, coding exercises and challenges.
In this lesson you'll learn:
- Class vs instance attribute
- Bound method
- Objects as message passing
Free to try in F03 Programming 2: Abstraction & Recursion:
The first 3 lessons of every course are free, no account needed.