IT Community - Software Programming, Web Development and Technical Support

Does Python supports Function Overloading?

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?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > Python

Register FAQ Members List Calendar Mark Forums Read
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 07-17-2007, 02:27 AM
Arun Arun is offline
D-Web Trainee
 
Join Date: Mar 2007
Posts: 43
Arun is on a distinguished road
Default Does Python supports Function Overloading?

hi,

Does Python supports Function Overloading?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-07-2007, 05:59 AM
vadivelanvaidyanathan vadivelanvaidyanathan is offline
D-Web Genius
 
Join Date: Feb 2007
Posts: 803
vadivelanvaidyanathan is on a distinguished road
Default Re: Does Python supports Function Overloading?

I think Nope because it has no form of function overloading.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-14-2007, 04:46 AM
santoshmalvi santoshmalvi is offline
D-Web Trainee
 
Join Date: Mar 2007
Location: Bangalore
Posts: 11
santoshmalvi is on a distinguished road
Default Re: Does Python supports Function Overloading?

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
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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 05:25 AM

Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between function overloading and operator overloading vigneshgets C and C++ Programming 4 06-24-2008 12:21 AM
MySQL supports indian language character sets priyan Database Support 16 12-12-2007 03:40 AM
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


All times are GMT -7. The time now is 02:16 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0