A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-October/104861.html below:

[Python-Dev] __setcall__

[Python-Dev] __setcall__ [Python-Dev] __setcall__Benjamin Peterson benjamin at python.org
Sun Oct 24 18:51:55 CEST 2010
2010/10/24 Bj Raz <whitequill.bj at gmail.com>:
> 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);
> end
> lnanswer
> q
>
> Any help would be appreciated.

Please see python-list. This list is for the development of python.

The SAGE math package can do something like this.



-- 
Regards,
Benjamin
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4