[Python-Dev] A thought on generic functions (original) (raw)

Greg Ewing greg.ewing at canterbury.ac.nz
Fri May 30 01:34:01 CEST 2008


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 is when folks tend to throw generics in the 'too complicated' basket ;)

Yep. :-)

Also, when hooking into things at such a deep level, I'd be a bit worried that I was catching too much, or that I was imposing performance penalties on unrelated things.

At least with getattr you know what you're doing can only affect the proxy object and nothing else.

-- Greg



More information about the Python-Dev mailing list