I agree. This is similar to the refactoring I did a while back with
the _eval_expand methods. There used to be a bunch of _eval_expand
methods that did nothing but recursively call _eval_expand on the
arguments of the function. I changed the API, and now each
_eval_expand is responsible for expanding the top-level function only,
and the recursive handling is done in one place in expand().  The same
should be done here.

Aaron Meurer


On Tue, Nov 26, 2013 at 3:26 AM, Sergey B Kirpichev
<[email protected]> wrote:
> Currently we have here things like this:
> def _eval_nseries(self, x, n, logx):
>     ...
>     arg = self.args[0]
>     arg_series = arg._eval_nseries(x, n=n, logx=logx)
>     if arg_series.is_Order:
>        return 1 + arg_series
>     arg0 = limit(arg_series.removeO(), x, 0)
>     if arg0 in [-oo, oo]:
>        return self
>     ...
>
> For me, it looks like we reinvent every time the
> composition of series.  Am I wrong here?
>
> Probably, this should go to sympy/core/function.py and
> _eval_nseries for functions should have only positional
> argindex argument, just like fdiff.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sympy.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to