Python is an object-oriented language. You have already seen what can be achieved using the methods provided by the basic data types. Central to the concept of object orientation is the class—a template for creating your own data types. A data type may be a person, for example, each of whom has unique aspects that might be specified by data such as LastName, FirstName, Age, Sex, and EyeColor. You might think of a class as a noun, representing objects that are described by unique aspects. These aspects are technically referred to in OOP as attributes.
KeywordsClass Definition Object Orientation Player Type Game Location Player Object
Unable to display preview. Download preview PDF.