Amazing technological breakthrough possible @S-Logix pro@slogix.in

Office Address

  • #5, First Floor, 4th Street Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 Landmark : Samiyar Madam
  • pro@slogix.in
  • +91- 81240 01111

Social List

How to implement method overloading in python?

Description

To implement method overloading in python3.

Process
Method overloading:

   Given a single method or function, we can specify the number of parameters our self.

   To overload a method by passing multiple parameters.

Sample Code

#class creation
class overload:
#sample method
def over_load(self,name=None):
if name is not None:
print(‘over’,name)
else:
print(‘over’)

#object creation
m=overload()

#method calling statement
m.over_load()
m.over_load(‘loading’)

Screenshots
implement method overloading in python