473,399 Members | 3,656 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Examples for Function Overloading

440 256MB
Hi,

Is Python supports Function Overloading?

Thanks
PSB
Feb 28 '07 #1
3 3863
bartonc
6,596 Expert 4TB
Hi,

Is Python supports Function Overloading?

Thanks
PSB
Just like you'd expect:
Expand|Select|Wrap|Line Numbers
  1. class SuperClass(object):
  2.     def func1(self):
  3.         print 1234
  4.  
  5. class SubClass(SuperClass):
  6.     def func1(self):
  7.         print 5678
  8.         SuperClass.func1(self)
Operator overloading, too. Currently being discussed here.
Feb 28 '07 #2
psbasha
440 256MB
Just like you'd expect:
Expand|Select|Wrap|Line Numbers
  1. class SuperClass(object):
  2.     def func1(self):
  3.         print 1234
  4.  
  5. class SubClass(SuperClass):
  6.     def func1(self):
  7.         print 5678
  8.         SuperClass.func1(self)
Operator overloading, too. Currently being discussed here.
Hi ,

Thanks for the example and link.

Could you please help me in getting the Operator example also.

Regards
Shakil
Feb 28 '07 #3
bartonc
6,596 Expert 4TB
Hi ,

Thanks for the example and link.

Could you please help me in getting the Operator example also.

Regards
Shakil
Operator overloading, too. Currently being discussed here.
Mar 2 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Doran_Dermot | last post by:
Hi All, I've seen lots of code in which the attributes of a class are accessed and modified using two separate methods. For example: class Problems: def __init__( self, refNum ):...
4
by: Dave Theese | last post by:
Hello all, I'm trying to get a grasp of the difference between specializing a function template and overloading it. The example below has a primary template, a specialization and an overload. ...
16
by: WittyGuy | last post by:
Hi, What is the major difference between function overloading and function templates? Thanks! http://www.gotw.ca/resources/clcm.htm for info about ]
39
by: zeus | last post by:
I know function overloading is not supported in C. I have a few questions about this: 1. Why? is it from technical reasons? if so, which? 2. why wasn't it introduced to the ANSI? 3. Is there any...
45
by: JaSeong Ju | last post by:
I would like to overload a C function. Is there any easy way to do this?
7
by: asdf | last post by:
They looks so similar. Anybody would like to tell me their differences? Thanks a lot.
15
by: lordkain | last post by:
is it possible to do some kind of function overloading in c? and that the return type is different
10
by: Matthew | last post by:
Am I correct in thinking there is no method/function overloading of any kind in any version of PHP? Thanks, Matthew
14
by: mesut | last post by:
hi colleagues, I don't know if this is the right group for but it's in C# so I try. I have a #3 procedural function called GetInfo.. and those are 3 overloaded methods. I would like to use the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.