On Jan 9, 8:08 am, "Aaron S. Meurer" <asmeu...@gmail.com> wrote:
> I have started changing sum() to summation() (I am leaving Sum alone).
>
Why don't we ask the larger python community (from which tomorrow's
sympy users will likely come). tutor list would be a good place as
might the educator's list. I can post the request if you like.

I like the ssum idea.

I was thinking about the sum() option having a dual nature: whatever
python does to sum wouldn't change anything for us if we did something
like:

    def sum(a, b):
        from python import sum as pysum
        if not isinstance(a, Basic): # or should it be Expr?
            return pysum(a, b)
        else:
            return Sum(a, b).doit()

If that import is done at the top this isn't adding much overhead.
What am I missing? When defining it as above way there is no worry
about errors or anything else since those will be raised if bad imput
was given.

Anything that is an iterable container that doesn't derive from Basic/
Expr will automatically work. In the following example I show that
python's sum will take sympy's Tuple:

    >>> from __builtin__ import sum as pysum
    >>> pysum(Tuple(1, 2, 3))
    6

Then what about changing integrate to integral so we have Sum/sum and
Integral/integral?

/c

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sy...@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to