[Zope] what is wrong with this code

Dylan Reinhardt zope at dylanreinhardt.com
Fri Oct 3 12:30:27 EDT 2003


On Fri, 2003-10-03 at 13:20, Jianping Zhu wrote:
> ####python code: example
> def hello(name="dad",age=29):
> 
>    return "Hello %s you are %d years old" % (name ,age)

If you're putting this into Python Script object, try adding name and
age to the list of parameters and just use the following for the
contents:

return 'Hello %s you are %d years old' % (name, age)

A Python Script object is the Zope analog to what you would create with
a def statement in regular Python.

HTH,

Dylan





More information about the Zope mailing list