On Thu, Dec 25, 2008 at 8:24 AM, anatoly techtonik <[email protected]> wrote:
> While learning Trac component architecture lesson that basically means
> that "extension point plugin instance will be created with the same
> ComponentManager where extension point provider is" I made some
> adjustments to core.py to understand its structure.
>
> Attached 0.11 branch diff changes __new__ to __init__ in component
> metaclass to convey the idea that metaclass doesn't control the
> component creation, but merely adjusts it and fills a registry. Some
> other lines are changed to increase readability.
>
> It would be nice to receive some feedback and to know whatever these
> changes are worthy to be committed.
>
> Happy Holidays!

This seemed unintuitive to me at first, but after thinking about it
I'm inclined to agree that it *does* make more sense.  As you say,
there's no particular reason here to override the metaclass's __new__.
 Without doing so it will still create the class as expected, and
calling ComponentMeta() will return the the class.  So overriding
type.__init__ seems to make more sense.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to