overloading a function

Dave Harrison dlharris at mail.usyd.edu.au
Thu Mar 7 08:36:46 EST 2002


Hi there all,

If I have a function, but I want to be able to call it two different ways - the ways being differentiated by the paramaters I pass the function) how do I do this ??

At the moment I have 

def Foo(num)

def Foo(num,dflt)

however I am only getting the first of the two, and the second function is ignored.

I couldn't find anything in the documentation, any ideas ?




More information about the Python-list mailing list