> What I'd like to see is how this changes if we use a generic functions
> (multiple dispatch) implementation instead of adaptation. Adaptation
> is pretty much isomorphic with a generic function of one argument (see
> my blog). But the register_for() method couldn't (shouldn't) interpret
> multiple arguments as multiple registrations; it should probably take
> this to match the call signature.

Zope interfaces support multi-adapters, and they're very useful in
certain cases. I belive this would match pretty well with a generic
function with more than a single argument.

If somebody is curious about the logic used to lookup adapters, the
interesting part is in zope.interface.adapter.AdapterLookup.lookup().

-- 
Gustavo Niemeyer
http://niemeyer.net
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to