[Python-Dev] __setcall__

Bj Raz whitequill.bj at gmail.com
Sun Oct 24 18:46:53 CEST 2010

I was looking for a way to set a function being equal to another function:
q(m+1) = q(m)+ ((-1)^m) * exp(lnanswer);
I was hoping to use something like this:
(q).__setcall__.(m+1) = (q).__setcall__.(m)+ ((-1)^m) * exp(lnanswer);
As a work around.
But I have not found the `__setcall__' built in being there.

Here is the code block I'm working with:

indvar = 200;
q = 0;
lnanswer = 0;
for m = 1:150
  lnanswer = (3 * m) * log(indvar) - log(factorial(3 * m))  ;
q(m+1) = q(m)+ ((-1)^m) * exp(lnanswer);

Any help would be appreciated.
Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20101024/3f1e8d62/attachment.html>

More information about the Python-Dev mailing list