[ZDP] BackTalk to Document The Zope Book (2.5 Edition)/Dynamic Content with DTML
Sat, 21 Sep 2002 21:17:08 -0400
A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZopeBook/current/DTML.stx#3-107
will *not* call the method, it will just try to insert it. The
result will be not a list of objects but a string such as
'<Python Method object at 8681298>'. If you ever see results
like this, there is a good chance that you're returning a
method, rather than calling it.
% Anonymous User - Sep. 21, 2002 8:36 pm:
The result will be not a list of objects
but a string such as '<Python Method object at 8681298>'
% Anonymous User - Sep. 21, 2002 9:17 pm:
<dtml-var "objectValues"> will insert a suitable ersatz representation like the string "<Python Method object
at 8681298>". This usually will not be visible in a browser since a browser treats anything between "<" and
">" that it does not recognize as HTML as unknown tag, but it will be visible, when you view the source.
If you really want to see the ersatz repr, <dtml-var "objectValues" html_quote> delivers "<Python Method
object at 8681298>" which a browser shows.