[ZDP] BackTalk to Document The Zope Book (2.5 Edition)/Advanced Zope Scripting

webmaster@zope.org webmaster@zope.org
Sat, 18 Jan 2003 16:25:50 -0500


A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZopeBook/current/ScriptingZope.stx#3-43

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

      In the Python version of the example, there is a subtle
      problem. You are probably expecting an integer rather than a
      string for age. You could manually convert the string to an
      integer using the Python *int* built-in::

        age=int(age) # covert a string to an integer

        % Anonymous User - June 11, 2002 7:26 pm:
         I wasn't expecting a string, since the previous form example clearly says age:int, and the meaning is self
         evident. Maybe you didn't want to introduct the :int already back there?

        % Anonymous User - Jan. 18, 2003 4:25 pm:
         ge <input type="text" name="age:int">
         Notice that the input type is "text", its merely the name that is "age:int".
         Methinks this means the variable named "age:int" is of type text.