Prevent self being passed to a function stored as a member variable?

Sandra-24 sandravandale at yahoo.com
Mon Sep 4 13:17:56 EDT 2006


Qiangning Hong wrote:
> Do you really get that error?

Sorry, my bad. You're correct of course. I had accidentally passed an
object, by naming it the same as the function, instead of my function,
and the object had __call__ defined, and took exactly two parameters,
just like my function, but one of them beign self. So when I passed two
arguments, it got three, and that's how I was confused into thinking
self was being passed to my function (because it was, but not to my
function.) All a big foulup on my part. I might have worked on that
problem for a while before figuring it out, thanks!

-Sandra




More information about the Python-list mailing list