other python ideas
shapr at uab.edu
Thu May 25 18:09:21 CEST 2000
Thomas Thiele wrote:
> 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
> 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
I vaguely recall seeing something like this in one of Guido's essays,
maybe it was the metaclass essay?
In any case, if you search comp.lang.python on deja.com, I'm quite sure
there was an automatic multimethod dispatch class of some kind posted in
the last year or two.
sHae mAtijs eRisson (sHae at wEbwitchEs.coM) gEnius fOr hIre
bRing mE fIve sQuirrels aNd nO oNe wIll gEt hUrt
13:00pm up 1 season, 1 squirrel, load average: 1+1j 0.5+2j 0.2+0.5j
More information about the Python-list