Re: [Python-Dev] A thought on generic functions

2008-05-30 Thread Neil Toronto
Greg Ewing wrote: Paul Moore wrote: I'd rather see a solution which addressed the wider visitor use case (I think I just sprained my back bending over backwards to avoid mentioning generic functions :-)) Speaking of generic functions, while thinking about the recent discussion on proxy

Re: [Python-Dev] A thought on generic functions

2008-05-29 Thread Nick Coghlan
Greg Ewing wrote: Paul Moore wrote: I'd rather see a solution which addressed the wider visitor use case (I think I just sprained my back bending over backwards to avoid mentioning generic functions :-)) Speaking of generic functions, while thinking about the recent discussion on proxy

Re: [Python-Dev] A thought on generic functions

2008-05-29 Thread Greg Ewing
Nick Coghlan wrote: I don't think it would actually be that much worse - something like typetools.ProxyMixin would just involve a whole series of register calls instead of method definitions. I wouldn't expect the total amount of code involved to change much. I'm not thinking about the

Re: [Python-Dev] A thought on generic functions

2008-05-29 Thread Nick Coghlan
Greg Ewing wrote: Nick Coghlan wrote: I don't think it would actually be that much worse - something like typetools.ProxyMixin would just involve a whole series of register calls instead of method definitions. I wouldn't expect the total amount of code involved to change much. I'm not

Re: [Python-Dev] A thought on generic functions

2008-05-29 Thread Greg Ewing
Nick Coghlan wrote: That's where the generic system itself needs to be based on generic functions - then you can hook the lookup function so that proxies get looked up based on their target type rather than the fact they're a proxy. It all gets very brain bending and self referential, which

[Python-Dev] A thought on generic functions

2008-05-28 Thread Greg Ewing
Paul Moore wrote: I'd rather see a solution which addressed the wider visitor use case (I think I just sprained my back bending over backwards to avoid mentioning generic functions :-)) Speaking of generic functions, while thinking about the recent discussion on proxy objects, it occurred to