On Wed, Nov 25, 2009 at 10:41 AM, Martijn Faassen
<faas...@startifact.com> wrote:
[snip good stuff]

> Multiadapter:
> IFoo.multi(x, y)

I'm not sure I like the following suggestion better than the above, but
throwing it out there anyway:



> Multiadapter with default:
> IFoo.multi(x, y, default=default)

Expanding the above:

IFoo((x,y), default=default)

> Utility:
> IFoo.utility()
> [or possibly IFoo() instead?]

I like IFoo().

> As a final thought, I don't like having to import 'implements' from
> zope.interface either. Since we're moving to Python 2.6 which supports
> class decorators, I'd like to see something like this become possible:
> @IFoo.implements
> class Foo(object):
>     pass

We already have the function decorator zope.interface.implementer, I'd
extend that notion:

class Foo(object):

> If we do well we might all have this for Christmas. :)

/me pens a letter to Zanta Claus.
Benji York
Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope )

Reply via email to