[Zope] How to make a ZPT-based form that calls itself?
Paul Winkler
pw_lists at slinkp.com
Wed May 11 19:31:56 EDT 2005
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
More information about the Zope
mailing list