> 1. This is a very naive comment, but why are all the calculus/
> calculus.py methods not in the form
> {{{
> function(self,parameters)}}}
>
> and instead in the form
> {{{
> function(ex,parameters)}}}
>
> or
> {{{
> function(expression,parameters)}}}
>
> ?  I understand why - in some sense it makes more sense than the usual
> convention - but it runs counter to all other files I've seen, where
> self is the first argument, including the same functions in the old
> calculus/calculus.py.

I think I answered this myself, sorry - they are not any longer
methods of a class.

But then it is even weirder that we have two functional versions of
"integral", one in misc/functional and the other in calculus/calculus
(not to mention calculus/functional).   Note that in fact the
docstring for calculus/calculus.py passes tests but is (implicitly)
testing the wrong functional integral, because the globally defined
integral calls only f.integral, while the integral defined in calculus/
calculus.py is different.  In fact:
{{{
 sage: integrate(sin,0,1)
Traceback (most recent call last):
...
TypeError
}}}
as before, because it is trying to coerce sin to SR and then
apply .integral but never gets there (and hence never uses this
integral function), while
{{{
sage: from sage.calculus.calculus import integral as cool_integral
sage: cool_integral(sin,0,1)
-cos(1) + 1
}}}
Which IMHO, which I know is not shared, is correct.  [ I will even
concede that the indefinite integral of sin could happily throw an
error, but this case is unambiguous and the code is right there in
calculus/calculus.py, which never asks anyone to evaluate f=x^2 as a
callable, I promise :) ]

Anyway, calculus.calculus integral is used by symbolic.expression
self.integral, so it's not like the code is unused, but somewhere it
seems like there is redundancy here, and I figured this was worth
pointing out, even though I am not sure which one should be considered
redundant.

- kcrisman
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to