[ZDP] BackTalk to Document The Zope Book (2.6 Edition)/Appendix C: Zope Page Templates Reference

webmaster at zope.org webmaster at zope.org
Fri May 28 16:26:02 EDT 2004


A comment to the paragraph below was recently added via http://zope.org/Documentation/Books/ZopeBook/2_6Edition/AppendixC.stx#3-173

---------------

      Using a module usage (pick a random choice from a list)::

        <span tal:replace="python:modules['random'].choice(['one', 
                             'two', 'three', 'four', 'five'])">
          a random number between one and five
        </span>

        % Anonymous User - May 28, 2004 4:26 pm:
         When do you use that syntax instead of an earlier example that used a path ("python:modules/string/join") to
         get at a function? Is it just author preference which to use?



More information about the ZDP mailing list