[Interface-dev] Doing multi-adaptation through interface call (again)

Glyph Lefkowitz glyph at divmod.com
Sun Aug 15 01:36:01 EDT 2004


On Sat, 2004-08-14 at 14:36 -0400, Itamar Shtull-Trauring wrote:

> Don't like this, for reasons you mentioned. Other suggestions:
> 
> D. IFoo(multiple=(a, b))
> 
> E. IFoo((a, b), multiple=True)

Why not resolve the namespace clash with __call__ by making it a
different method, e.g. 

	IFoo.multi(a, b)

On the other hand, if IFoo *always* requires multiple adaptees, perhaps
the correct solution is to make the __call__ signature of interfaces
parameterizeable somehow, so that you can do IFoo(a, b, c=d) and have
those arguments get relayed (as *a, **kw) to the underlying factory?

In this case it seems that IFoo(a) would be an error either way.



More information about the Interface-dev mailing list