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
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
