Dieter Maurer wrote:
Joseph A Knapka writes:
Stupid question of the day: This does not seem stupid at all!
Why might the following code result in a KeyError? It does in some contexts under Zope 2.5.0.
<dtml-if expr="REQUEST.has_key('xyz')"> <dtml-else> <dtml-call expr="REQUEST.set('xyz','Hello world')"> </dtml-if>
Sometimes the next line results in a KeyError, value 'xyz':
<dtml-var name="xyz">
In such cases, this works fine:
<dtml-with REQUEST only> <dtml-var name="xyz"> </dtml-with> This appears to be a bug.
When you happen to reproduce it, we may be able to analyse its cause.
OK. I have production code that demonstrates the problem, but I haven't got a simple test case to break yet. I'll attempt to have something analyzable within the next couple of days. Thanks, -- Joe "I should like to close this book by sticking out any part of my neck which is not yet exposed, and making a few predictions about how the problem of quantum gravity will in the end be solved." --- Physicist Lee Smolin, "Three Roads to Quantum Gravity"