11 May
2005
11 May
'05
11:31 p.m.
On Wed, May 11, 2005 at 04:51:33PM -0500, J Cameron Cooper wrote:
Look at your Python. It understands a dot as an attribute access. That's why Zope historically avoids dotted object names. Witness 'index_html'.
You may use dictionary lookup:
context['deltest.htm']()
or getattr.
But note that they're not semantically equivalent. getattr(foo, 'bar') might use acquisition to find 'bar'. foo['bar'] does not use acquisition, it only looks directly in foo. I don't like this difference, but, whatever. -- Paul Winkler http://www.slinkp.com