Electron microscopy
 
Object
- Python for Integrated Circuits -
- An Online Book -
Python for Integrated Circuits                                                                                   http://www.globalsino.com/ICs/        


Chapter/Index: Introduction | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | Appendix

=================================================================================

          Class -- Class is a set or category of things having some property or attribute in common and differentiated from others by kind, type, or quality. In technical terms we can say that class is a blue print for individual objects with exact behaviour.
          Object -- object is one of instances of the class. which can perform the functionalities which are defined in the class.
          self -- self represents the instance of the class. By using the "self" keyword we can access the attributes and methods of the class in python.
          __init__ -- "__init__" is a reseved method in python classes. It is known as a constructor in object oriented concepts. This method called when an object is created from the class and it allow the class to initialize the attributes of a class.

          class Car(object):
                def __init__(self, model, color, company, speed_limit):
                    self.color = color
                    self.company = company
                    self.speed_limit = speed_limit
                    self.model = model

          maruthi_suzuki = Car("Toyota", "black", "Corola", 60)

Everything in Python is an object. Each object has identity, a type, and a value. The word object is synonymous with instance. code. code. After an object is created, you can change the value of any attribute at any time by using objectname.attributename = value, e.g. code.

============================================

         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         

 

 

 

 

 



















































 

 

 

 

 

=================================================================================