I haven't been following this whole thread, but it sounds like you want
something like PJE's RuleDispatch package.
There's a Developer Works article about it, put up very recently:
http://www-128.ibm.com/developerworks/linux/library/l-cppeak2/?ca=dgr-
lnxw02aScalingPEAK
PJE (IIRC) based it of
Pierre Barbier de Reuille <[EMAIL PROTECTED]> wrote:
> Now suppose you have two classes A and B, B subclassing A.
> If you define :
>
> @method(A)
> def myfct(f):
> do_something_with_f
>
> Then, you want it to work with any object of type B ... but with either
> Guido's or this implementation, it
Kay Schluehr a écrit :
> Catalin Marinas wrote:
>
>>Hi,
>>
>>Sorry if this was previously discussed but it's something I miss in
>>Python. I get around this using isinstance() but it would be cleaner
>>to have separate functions with the same name but different argument
>>types. I think the idea g
"Kay Schluehr" <[EMAIL PROTECTED]> wrote:
> Catalin Marinas wrote:
>> Hi,
>>
>> Sorry if this was previously discussed but it's something I miss in
>> Python. I get around this using isinstance() but it would be cleaner
>> to have separate functions with the same name but different argument
>> type
Catalin Marinas wrote:
> Hi,
>
> Sorry if this was previously discussed but it's something I miss in
> Python. I get around this using isinstance() but it would be cleaner
> to have separate functions with the same name but different argument
> types. I think the idea gets quite close to the Lisp/