December 2000
Intermediate to advanced
816 pages
16h 57m
English
A class is merely a container for static data members or function declarations, called a class's attributes. Classes provide something which can be considered a blueprint for creating “real” objects, called class instances. Functions which are part of classes are called methods. Classes are an object-oriented construct that are not required at this stage in learning Python. However, we will present it here for those who have some background in object-oriented methodology and would like to see how classes are implemented in Python.
class class_name[( base_classes_if_any)]: "optional documentation string" static_member_declarations method_declarations
Classes are declared using the class keyword. If a subclass ...
Read now
Unlock full access