This is a discussion on Does Python supports Function Overloading? within the Python forums, part of the Software Development category; hi, Does Python supports Function Overloading?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| hi, Does Python supports Function Overloading? |
|
#2
| |||
| |||
| I think Nope because it has no form of function overloading. |
|
#3
| |||
| |||
| Bit explaination on python Function Overloading? Java and Powerbuilder support function overloading by argument list, i.e. one class can have multiple methods with the same name but a different number of arguments, or arguments of different types. Other languages (most notably PL/SQL) even support function overloading by argument name; i.e. one class can have multiple methods with the same name and the same number of arguments of the same type but different argument names. Python supports neither of these; it has no form of function overloading whatsoever. Methods are defined solely by their name, and there can be only one method per class with a given name. So if a descendant class has an __init__ method, it always overrides the ancestor __init__ method, even if the descendant defines it with a different argument list. And the same rule applies to any other method. Thank you, Santosh Malvi |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MySQL supports indian language character sets | priyan | Database Support | 17 | 01-11-2010 12:25 AM |
| Difference between function overloading and operator overloading | vigneshgets | C and C++ Programming | 6 | 12-17-2008 06:21 PM |
| environments supports | simplesabita | Testing Tools | 1 | 08-22-2007 02:59 AM |
| Does Python supports Operator Overloading? | vadivelanvaidyanathan | Python | 1 | 07-17-2007 02:10 AM |
| Diff inline function and ordinary function | vigneshgets | C and C++ Programming | 1 | 05-24-2007 10:34 AM |
Our Partners |