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 _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )