[Zope] dtml methods and properties

2000-12-03 Thread Willem Broekema

As a DTML method is said to work with the properties of the object it
is called at:

DTML method "m":
 

/m 
 displays the date/time when the last change happened to any file
 in the root folder

/m/m
 displays last change date/time of method m

Why does the method not display it's modification time on the first
occasion? Or: why does it not give the folder's modification time
on the second occasion?

- Willem

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




[Zope] Python method: recursive function gives NameError

2000-11-28 Thread Willem Broekema

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
__call__
(Object: rec)
(Info: ((), {}, None))
File , line 6, in rec
(Object: myfunc)
File , line 3, in myfunc
NameError: (see above)
---

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


- Willem

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