Advance Python - Polymorphism

avatar

NaN years ago

The perfect real-world example of polymorphism will be human behaviour, sometimes we act differently according to the place. A person can be called a student, a son, or an employee based on the location in spite of being the same person.


In Python programming, polymorphism is one of the concepts of object-oriented programming which defines the characteristics of classes if the child class and parent class have methods with the same name.


Pros

  • Polymorphism helps programmers to reuse the code,
  • Polymorphism helps testers to easily debug the code,
  • Polymorphism reduces coupling between different functionality.

Cons

  • It is difficult to implement polymorphism in code,
  • Polymorphism creates performance issues in runtime,
  • Polymorphism implemented code becomes difficult to read.


To learn more about Polymorphism, please use the resources.

approvedApproved by experts
Advance Topics

Neuton's Mission

We are a team of young and enthusiastic people who are passionate about education and want to help students to learn the skills they need to succeed in life. If you want to support us, please join our community.

phonephonephonephonemail