What are the main features of OOP when used in Python?
Object Oriented Programming (OOP)
in Python isn't much different than in other languages. It has the same major ideas with a different syntax.
We still use the following big concepts:
- Classes and objects
- Inheritance
- Encapsulation
- Polymorphism
- Abstraction
The above mentioned are the main ideas of traditional OOP as well. A class in Python is defined using the keyword class
. Similarly, objects
are the instances of a class.