Python Constructors
A constructor is a special type of method ( function) which is used to initialize the instance members of the class.2 Types of Constructor
1.parameterized 2. non-parameterizedConstructor definition executes when we create object of the class. Constructors also verify that there are enough resources for the object to perform any start-up task.
Destructor
Destructors are called when an object gets destroyed. It’s the polar opposite of the constructor, which gets called on creation.These methods are only called on creation and destruction of the object. They are not called manually but completely automatic.
To know more about python at TCCI .
Call us @ 9825618292
Visit us @ http://tccicomputercoaching.com/
No comments:
Post a Comment