[Zope-PTK] PTK II

Shane Hathaway shane@digicool.com
Tue, 01 Aug 2000 09:57:18 -0400


Chris Withers wrote:
> > Three states would be available (should all three states have names?):
> 
> Yes! No meaningless numbers please ;-)
> 
> How about:
> > __replaceable__ = ObjectManager.NOT_REPLACEABLE # current
> > behavior
> > __replaceable__ = ObjectManager.REPLACEABLE # instance config
> > __replaceable__ = ObjectManager.SINGLETON   # singleton
> 
> ?

Would you post that in the Wiki discussion?

> 
> > There already is a _.this, it's set to the DTMLMethod or Document that
> > first created the namespace.
> 
> Is that the same as this() or something different?!

It's different, unfortunately.  It's set by the first DTML method or
document that sets up the namespace.  Most people don't know about it,
which is good because it's a clean way to shoot yourself in the foot.
:-)

> > But we could add a _.self.  That would
> > solve the keyword problem.  One line of code.  One word: wow.
> 
> Cool :-)

Jim has a point on the binding issue though.  Even better than "_.self"
is just "self", which should be possible (and reliable) with method
binding.  We don't want to create a new interface that's deprecated the
moment it leaves the door!

Shane