> There would seem to be two ways to 'fix' this, I'll leave it as an exercise
> for the reader to discuss which is best.
>
> Option 1:
> def foo(self,counter=None):
> some code
> if bar == somewhat:
> self.foo(counter=some_int)
Option 1 has a problem. If you give it a different name in dtml, e.g.
bar and call it: <dtml-var "bar(counter=5)"> then self is a reference
to the folder and self.foo doesn't exist. If there is a different method
'foo' in the folder that other method will be called instead.
>
> Option 2:
> def foo(self,counter=None):
> some code
> if bar == somewhat:
> foo(self,counter=some_int)
>
This one should work as advertised. (Unless you redefine foo in the
python module in which case you get what you deserve).
--
Duncan Booth [EMAIL PROTECTED]
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?
http://dales.rmplc.co.uk/Duncan
_______________________________________________
Zope-Dev maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope )