Re: [Zope-dev] Two small convenience suggestions for zope.interface and zope.component

2009-04-02 Thread Lennart Regebro
2009/4/1 Marius Gedminas mar...@gedmin.as: I now also wonder if adapter()/implementer() would work when called with classes rather than functions...? Yes, in 2.6 and 3.0. Not with the current trunk of zope.interfaces, though, but in the future, sure. -- Lennart Regebro: Pythonista, Barista,

Re: [Zope-dev] Two small convenience suggestions for zope.interface and zope.component

2009-04-02 Thread Lennart Regebro
On Wed, Apr 1, 2009 at 12:25, Chris Rossi ch...@archimedeanco.com wrote: Additionally, if I was grokking Lennart correctly yesterday, __metaclass__ is going away, so the current metaclass implementation is going to need some rejiggering.  What was unclear was whether a single implementation

[Zope-dev] Two small convenience suggestions for zope.interface and zope.component

2009-04-01 Thread Martin Aspeli
Hi, I'd like to add support for the following: 1) Provider decorator: @provider(IFoo) def some_function(context) pass This is an alternative to doing a separate alsoProvides() on the function. 2) An interfaceProvides directive: class IFoo(Interface):

Re: [Zope-dev] Two small convenience suggestions for zope.interface and zope.component

2009-04-01 Thread Jim Fulton
On Apr 1, 2009, at 10:02 AM, Martin Aspeli wrote: Hi, I'd like to add support for the following: 1) Provider decorator: @provider(IFoo) def some_function(context) pass This is an alternative to doing a separate alsoProvides() on the function. 2) An interfaceProvides

Re: [Zope-dev] Two small convenience suggestions for zope.interface and zope.component

2009-04-01 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martin Aspeli wrote: Hi, I'd like to add support for the following: 1) Provider decorator: @provider(IFoo) def some_function(context) pass This is an alternative to doing a separate alsoProvides() on the function. 2) An

Re: [Zope-dev] Two small convenience suggestions for zope.interface and zope.component

2009-04-01 Thread Matthew Wilkes
On 1 Apr 2009, at 18:25, Chris Rossi wrote: Additionally, if I was grokking Lennart correctly yesterday, __metaclass__ is going away, so the current metaclass implementation is going to need some rejiggering. What was unclear was whether a single implementation could support both =2.5 and

Re: [Zope-dev] Two small convenience suggestions for zope.interface and zope.component

2009-04-01 Thread Dieter Maurer
Martin Aspeli wrote at 2009-4-1 22:02 +0800: I'd like to add support for the following: 1) Provider decorator: @provider(IFoo) def some_function(context) pass I have already searched for this several times -- and was disappointed about my failure :-) -- Dieter