[Zope] Script (Python) function definitions

Paul Winkler slinkp23@yahoo.com
Thu, 12 Jul 2001 15:43:45 -0400


Dieter Maurer wrote:
> 
> Michael Casaday writes:
>  > Defining functions within Script (Python) methods doesn't seem to work very
>  > well.  This code...
>  >
>  >
>  >  def funcA():
>  >   print "<p>Hello, from funcA()!</p>"
>  >
>  >  def funcB():

For python < 2.1 (i.e. zope < 2.4), you can get what you want if you pass funcA
to funcB, like this:

def funcB(funcA=funcA):

-- 
...................    paul winkler   ....................
custom calendars & printing: http://www.calendargalaxy.com
       A member of ARMS:   http://www.reacharms.com
            home page:  http://www.slinkp.com