[Grok-dev] Re: Grok feature or bug?
faassen at startifact.com
Tue Jan 22 12:30:10 EST 2008
Christian Theune wrote:
> Martijn Faassen schrieb:
>> Sebastian Ware wrote:
>>> I defined two classes "class View(grok.EditForm)" by mistake, without
>>> Grok complaining. Is this a feature or a bug?
>>> I am thinking since Grok complains if I unassociated page templates,
>>> maybe this is another thing that should be checked.
>> Yes, ideally it should be. It's tripped me up a few times myself.
>> Unfortunately the way Python works is that if two declarations of a
>> class exist in a row, the later one always wins. So:
> We could catch this using stack inspection eventually, but I guess that
> would require meta classes ... *duck*
Yeah, with meta-classes you could solve it. There are a few things
metaclasses would solve (determining order of class definitions could be
done, something that would be useful), but I'd like to keep meta-classes
to a miminum in Grok as they also create problems...
More information about the Grok-dev