OOPs concepts in Python

less than 1 minute read

Refresher

  • Each object is an instance of a class.
  • data members and member functions
  • OOPs design allows us to think from behaviour point of view
  • Object Oriented Design Goals:
    1. Robustness
      • handle various unexpected inputs, types
      • handle load (eg, high volume of data)
      • edge conditions
    2. Adaptibility
      • handle change for environments
      • correct faults
      • improve performance
    3. Reusability
  • Object Oriented Design Principles:
    1. Modularity
    2. Abstraction
    3. Encapsulation
  • Essential Software Development Principles for Python
    1. Classes - CamelCase
    2. Functions - all small and use underscore instead of space
    3. constant should be written as all capital MAX, MIN