[Grok-dev] meta class in megrok.resource?

Martijn Faassen faassen at startifact.com
Fri Nov 20 06:50:09 EST 2009


Souheil CHELFOUH wrote:
> I understand your point and I have no dogma in this.
> We ca neasy restaure the thing how it was before.
> The point of using the metaclass was simply to avoid grokking the
> package simply to set a name

Okay, but now we have a scary metaclass just to set the name. :)

> I'm very much in favor to simply use name = "". The use of grok.name
> must be to "help and serve" not to constrain us.

That's true. But it's also a matter of consistency: grok.name() has 
everywhere been setting the name under which things have been 
registered. Here we need '.name' as a library, hurry.resource, needs the 
library name. We should definitely be open to the idea that we can 
change hurry.resource.

> Here, I felt the grokker was "way" too expensive just to set and attribute.
> But, I did some work more yesterday that makes me feel like I did a
> mistake on this
> Trying to classProvides made me realize that this won't work, since
> classProvides does not work with the subclasses.
> Therefore, we'll have to directlyProvides(cls, ILibrary) in a grokker,
> to make it work properly.

Ah, yeah, I hadn't realized that. Makes sense.

Regards,

Martijn



More information about the Grok-dev mailing list