On 11/8/12 6:26 AM, Simon King wrote:
Hi David and John,

On 2012-11-08, David Loeffler <d.a.loeff...@warwick.ac.uk> wrote:
It is *really awful* that V.sum(W) attempts to sum all the elements of
W! I don't know what general design decision underlies this but I
don't like it.

That's easy to explain. All additive semigroups should be able to sum up a
list of their elements. Hence, such as summation method is defined by
the category framework.

Are there any examples where it is more complicated than just sum(args, self.zero())? If not, I think I side with John in questioning the value of the function.

If each element of args was changed into an element of V before summing, then it seems that the function's utility might be argued more strongly. Something like:

sum((self(i) for i in args), self.zero())

Thanks,

Jason


--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
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.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.


Reply via email to