Advertisements
Advertisements
प्रश्न
Is function overloading supported by Python? Give reasons.
कारण बताइए
Advertisements
उत्तर
No. Python does not support traditional function overloading based on different parameter lists.
- A function name can refer to only one function definition at a time.
- If the same function name is defined again, the latest definition overwrites the earlier one.
- Similar behaviour can be achieved in Python using default arguments, variable-length arguments (
*args), or type checking.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
