Python Object Oriented
Python has been an object-oriented language since it existed. Because of this, creating and using classes and objects are downright easy. This chapter helps you become an expert in using Python's object-oriented programming support. If you do not have any previous experience with object-oriented (OO) programming, you may want to consult an introductory course on it or at least a tutorial of some sort so that you have a grasp of the basic concepts. However, here is small introduction of Object-Oriented Programming (OOP) to bring you at speed − Overview of OOP Terminology Class: A user-defined prototype for an object that defines a set of attributes that characterize any object of the class. Creating Classes The class statement creates a new class definition. class ClassName: 'Optional class documentation string' class_suite The class has a documentation string, which can be accessed via ClassName. Example Following is the example of a simple Python class − Creating Instance Objects #! #! #! Syntax #!
• dev python