PythonCoursespython programming

Object Oriented Programming in Python – Aided with Diagrams

Object Oriented Programming in Python – Aided with Diagrams

This course includes;

-Class,

-Objects,

-Inheritance (Multi-level and Multi-layers of Inheritance)

-Overriding the functionality of Parent Class

-Method Resolution Order

-Operator Overloading

with concepts, diagrams, syntax and examples and

Some of the Common Operator Overloading Special Functions in Python

# Operator         Expression      Internally

# Addition         p1 + p2          p1.__add__(p2)

# Subtraction p1 – p2          p1.__sub__(p2)

# Multiplication p1 * p2          p1.__mul__(p2)

# Power                 p1 ** p2          p1.__pow__(p2)

# Division         p1 / p2          p1.__truediv__(p2)

 

Tags

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button
Close

Adblock Detected!

Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by whitelisting our website. disable your ad blocker and refresh the page