In this lesson, you’ll learn where classes and objects are used in real software, as well as how they’re defined in Python.
We can define an empty Dog class like this:
class Dog:
pass
Classes contain characteristics called Attributes. We make a distinction between instance attributes and class attributes.
Instance Attributes are unique to each object, (an instance is another name for an object). Here, any Dog
object we create will be able to store its name and age. We can change either attribute of either dog, without affecting any other dog objects we’ve created:
Peter T on March 22, 2019
In the text below the video, don’t you need to change: “Behaviors are actually called Attributes.” to “Properties are actually called Attributes & Behaviors are actually called Methods.”?