other python ideas

Thomas Thiele thiele at muc.das-werk.de
Tue May 23 10:28:02 EDT 2000


> It's not so hard to write a dispatch function if that's what you really want:
>
>

That's right. But it is easy as well to write a class for complex numbers. But these are included.
Python is redundant. And a little bit more redudance should be not the problem. I would like to
overload
functions and operators(!)

foo( a )                called by only one argument
foo( a ,b )            called by two arguments
foo( <int>a, b )    called by two arguments if the first is an int
foo( a, <int> b)    called by two arguments if the second arg is an int
....and so on

Thomas






More information about the Python-list mailing list