Python Programming - Polymorphism - Discussion

Discussion Forum : Polymorphism - General Questions (Q.No. 2)
2.
Which of the following statements about method overloading in Python is correct?
Python supports method overloading with different return types
Python supports method overloading with the same method name but different parameters
Method overloading is not allowed in Python
Python supports method overloading by explicitly specifying the data type of parameters
Answer: Option
Explanation:
Python does not support method overloading in the traditional sense as it is done in languages like Java. Methods with the same name in a class will override each other.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.