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.


Class Definition Object Orientation Player Type Game Location Player Object 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Tim Hall and J-P Stacey 2009

Personalised recommendations