From: Itamar Shtull-Trauring <[EMAIL PROTECTED]>
> However, when I call the function, I get an error about DocumentTemplate,
> from which I discovered that when I call _.logvis('a_string'), instead of
> the string being passed as the first parameter, _ is passed as the first
> parameter to my function, forcing me to truncate it when calling log2vis:
> Any idea what could cause this strange behaviour? it doesn't happen for
> other functions inserted into _ in DT_Util.py.
When you stuff a function into "d", you're adding it to the class dictionary of
it effectively becomes a method of that class. The first argument gets treated as
"self", just like
in any other class method.
All of the functions in DT_Util are either builtins (which never get turned into bound
functions with a leading "self" parameter.
Evan @ digicool & 4-am
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -