[Interface-dev] Re: Interface and Adapter Demo

Christian Robottom Reis kiko at async.com.br
Mon Jun 28 00:28:01 EDT 2004


On Sun, Jun 27, 2004 at 09:18:46PM -0400, Tres Seaver wrote:
> >>The third argument in the name of the adapter. Since we do not care
> >>about names, we simply leave it as an empty string. 
> >
> >Conventionally (perhaps Zope-conventionally <wink>), what are these
> >names useful for?
> 
> Registerning alternative adapters for a given target interface;  the 
> default name is the empty string.

This is the only part of the explanation I didn't catch. Oh, maybe I
just did. Does this mean you can do:

    r.register([IFile], ISize, "sizer A", FileSize)
    r.register([IFile], ISize, "sizer B", FileSizeExtended)

and then specify the string when doing a lookup? 

If so, I assume in this case you can't use the simple ISize(file) form.

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 3361 2331


More information about the Interface-dev mailing list