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:
- Robustness
- handle various unexpected inputs, types
- handle load (eg, high volume of data)
- edge conditions
- Adaptibility
- handle change for environments
- correct faults
- improve performance
- Reusability
- Object Oriented Design Principles:
- Modularity
- Abstraction
- Encapsulation
- Essential Software Development Principles for Python
- Classes - CamelCase
- Functions - all small and use underscore instead of space
- constant should be written as all capital MAX, MIN