Computer Science : Python Modularity and OOPS : Python Classes and Objects
Points to remember
· Python is an Object Oriented Programming language.
·Classes and Objects are the key features of Object Oriented Programming.
·In Python, a class is defined by using the keyword class.
·Variables defined inside a class is called as “Class Variable” and function are called as “Methods”.
·The process of creating object is called as “Class Instantiation”.
·Constructor is the special function that is automatically executed when an object of a class is created.
·In Python, there is a special function called “init” is used as Constructor.
·Destructor is also a special method gets execution automatically when an object exits from the scope.
·In Python, __del__( ) method is used as destructor.
·A variable prefixed with double underscore is becomes private in nature.
Related Topics
Privacy Policy, Terms and Conditions, DMCA Policy and Compliant
Copyright © 2018-2024 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.