On Mon, Mar 21, 2011 at 10:07 AM, Lennart Regebro <rege...@gmail.com> wrote:
> On Mon, Mar 21, 2011 at 14:17, Martijn Faassen <faas...@startifact.com> wrote:
> With martian, the registration is then done by the grokking process,
> but I think decorators would be a process that is more acceptable to
> the Python world in general. Instances does indeed require something
> else than decorators, I hadn't thought of that, that's a drawback.

I think Martijn raised a good question about the conceptual
interaction of class decorators and inheritance.  (Arguablly the
questions applies to the "advice"-based syntax as well.) If I see:

class Base:

class Sub(Base):

I'm going to wonder how the decorator affects Sub. (Wondering is work. :)

This might be OK for @implements and maybe @adapts, which describe
behavior, but start feeling wonky to me for something like: @utility.
Maybe it's enough to document what the directives do.  Or maybe
something less attached to the class definition would make sense.

I don't know what the right answer is ... at least not yet. :)


Jim Fulton
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