On Wed, Apr 1, 2009 at 12: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
2009/4/1 Marius Gedminas :
> 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, Notsotrista.
htt
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
__
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 a
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 >=2.6.
Chris
On Wed, Apr 1, 2009 at 1:09 PM, Mar
Hi Marius,
> It's a Python 2.6/3.0 feature:
Oh... sniff... I so want that. ;)
> from zope.component import adapter
> from zope.interface import implementer
>
> @adapter(IFoo)
> @implementer(IBar)
> class MyClass(object):
>
> def __init__(self, context):
>
On Wed, Apr 01, 2009 at 10:56:30PM +0800, Martin Aspeli wrote:
> Tres Seaver wrote:
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > Martin Aspeli wrote:
> >> Hi,
> >>
> >> I'd like to add support for the following:
> >>
> >> 1) Provider decorator:
> >>
> >> @provider(IFoo)
> >> d
Tres Seaver wrote:
> -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
-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.
>
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 interface
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):
interfaceProvides(ISome
11 matches
Mail list logo