[Zope-dev] implementing zope.component 4.0

Thomas Lotze tl at gocept.com
Wed Dec 2 02:21:00 EST 2009


Chris McDonough wrote:

> Furthermore he'll believe he "owns" the resulting object, because normal
> classes are always constructors that create a new object.

Except when they don't. Apart from cases like short strings and small
integers where Python itself doesn't create objects more than once, you
can always implement classes that define __new__ or use metaclasses in
such a way that you cannot be sure that (or whether) calling them under
given circumstances will create new objects.

To be honest, I just don't see why this whole singleton business shouldn't
be orthogonal to the concepts of the component architecture.

-- 
Thomas





More information about the Zope-Dev mailing list