On Fri, 10 Mar 2000, Phil Harris wrote:
As someone earlier today on the list said, "if it's in quotes it's python" (or something similar).
Basically Python rules apply when using any expressions in zope dtml-var and other tags.
I still think it's an inconsistent syntax. It should be possible (by overriding __coerce__, I think? I haven't had time to look this up yet) to make the == operator do something different. AUTHENTICATED_USER is often used as a string (at least what I've seen of it ...) Also, "if it's in quotes it's in python", why do I need to do _.str()? why does dir() not work? It seems like some pretty horribly munged sort of python...
I would expect an object to behave consistently wherever it was used - so if it renders/returns/evaluates to 'zope' inside a dtml-var I would expect it equally to render/return/evaluate to 'zope' inside a dtml-if.
If it doesn't then surely we have an inconsistent syntax. How do we know how any object is going to behave inside a dtml tag ?
______ __ __ _____ _ _ | ____ | \_/ |_____] |_____| |_____| |_____ | | | | @ t w i s t e d m a t r i x . c o m http://www.twistedmatrix.com/~glyph/