[Zope-dev] Non-ZCML config for ZCA. (Was: Anyone want to do Google Summer of code mentoring for PSF?)
Jim Fulton
jim at zope.com
Mon Mar 21 10:28:43 EDT 2011
On Mon, Mar 21, 2011 at 10:07 AM, Lennart Regebro <regebro at gmail.com> wrote:
> On Mon, Mar 21, 2011 at 14:17, Martijn Faassen <faassen at 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:
@some_decorator
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
--
Jim Fulton
http://www.linkedin.com/in/jimfulton
More information about the Zope-Dev
mailing list