I have a simple recursive function in a Python method that gives a
NameError (2.2.4 on Win98).

The function (in PM named 'rec'):
def myfunc(i):
  if i >= 10: return myfunc(1)
  else: return 1

return myfunc(11)

The end of the traceback:
File c:\myzopeinstance\...cts\PythonMethod\PythonMethod.py, line 168, in
    (Object: rec)
    (Info: ((), {}, None))
File <string>, line 6, in rec
    (Object: myfunc)
File <string>, line 3, in myfunc
NameError: (see above)

Isn't it allowed to have a recursive function here?

- Willem

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to