Hi,

>1. The class is created.
>2. Any class META stuff is taken care of. This may be merged into the
>next step.
>3. Any remaining attributes of the class are added to the class under
>their own control. If they have a method of the signature:
>
>contribute_to_class(self, cls, name)

Hmm. I like that. Has a bit of enhanced meta object protocol. And
definitely makes the system much easier to extend.

>class Something(Model):
>   name = CharField(maxlength=100)
>   tags = TagCollection()
>   comments = CommentCollection()
>   acls = ACLCollection()

Maybe it could be done with a class BEHAVIOUR instead, where attributes
are culled from? Ok, I _do_ like your proposal - but it might be a bit
irritating of which is a field and which is a behaviour (just as Jacob
said).

On the other hand, if we stick behaviours into the class, they behave
much like the manager and your proposed ordering, so it might just be
the best way to stick it there. And things like TagCollection _is_ a
field (at least it's with my AbstractTaggig stuff). Yes, I think I am
+1 on this.

>I've looked around, and it seems like the smart choice for events is
>pydispatcher.
>I also looked at RuleDispatch, but this is a dependency too far right
>now - it is quite a lot bigger in scope, includes C modules, and while a
>lot of what it does is Ubercool®, YAGNI.

You know that I might be a bit sad about RuleDispatch not making it ;)
- but any useful event system is better than none, so I am quite happy
about PyDispatcher making it in. A very strong +1 from me - especially
if we start to add loads of events to the core :-)

bye, Georg

Reply via email to