मराठी

Is function overloading supported by Python? Give reasons.

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
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 2: Concept of Object Oriented Programming - EXCERCISE [पृष्ठ ३७]

APPEARS IN

सीबीएसई Computer Science with Python [English] Class 12
पाठ 2 Concept of Object Oriented Programming
EXCERCISE | Q 11. | पृष्ठ ३७
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×