Functions, Operators, and Overloading?
Bruno Desthuilliers
bdesth.quelquechose at free.quelquepart.fr
Mon Jul 24 16:41:54 EDT 2006
Michael Yanowitz a écrit :
> Hello:
>
> Maybe I am missing something, but from what I've seen,
> it is not possible to overload functions in Python. That
> is I can't have a
> def func1 (int1, string1):
> and a
> def func1 (int1, int3, string1, string2):
> without the second func1 overwriting the first.
You may want to have a look at Philip Eby's dispatch package. Here's an
introduction:
http://peak.telecommunity.com/DevCenter/VisitorRevisited
> However, operators can be overloaded.
> So can I define a new operator?
No.
More information about the Python-list
mailing list