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 |
| |||
| 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 | |
| |
LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/python/1941-does-python-supports-function-overloading.html | |||
| Posted By | For | Type | Date |
| DiscussWeb IT Community - Fusing | This thread | Refback | 08-09-2007 06:25 AM |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Difference between function overloading and operator overloading | vigneshgets | C and C++ Programming | 6 | 10-23-2008 11:01 AM |
| MySQL supports indian language character sets | priyan | Database Support | 16 | 12-12-2007 04:40 AM |
| environments supports | simplesabita | Testing Tools | 1 | 08-22-2007 03:59 AM |
| Does Python supports Operator Overloading? | vadivelanvaidyanathan | Python | 1 | 07-17-2007 03:10 AM |
| Diff inline function and ordinary function | vigneshgets | C and C++ Programming | 1 | 05-24-2007 11:34 AM |