Re: [sage-devel] Re: self.sum() method on vector made of int is not defined

2010-11-14 Thread William Stein
On Sun, Nov 14, 2010 at 5:31 AM, Dima Pasechnik wrote: > > > On Nov 14, 1:51 pm, William Stein wrote: >> Hi, >> >> This thread is about sum. >> >> 1. Dima said: >> >> > I don't think sum() method is needed. It's certainly a code bloat. >> >> This is a very, very misinformed comment. I want to add

Re: [sage-devel] Re: self.sum() method on vector made of int is not defined

2010-11-13 Thread William Stein
Hi, This thread is about sum. 1. Dima said: > I don't think sum() method is needed. It's certainly a code bloat. This is a very, very misinformed comment. I want to address it, especially the statement "It's certainly a code bloat." It is absolutely *NOT* code bloat to define a sum method for

Re: [sage-devel] Re: self.sum() method on vector made of int is not defined

2010-11-13 Thread Tom Boothby
I agree, John. It would be better to define a .sum() method on the generic vector class, which calls the global sum(). Then, it'll be overridden by various classes which can do it faster. On Sat, Nov 13, 2010 at 6:15 AM, John Cremona wrote: > I'm not sure I agree with this.  I would expect the

Re: [sage-devel] Re: self.sum() method on vector made of int is not defined

2010-11-13 Thread John Cremona
I'm not sure I agree with this. I would expect the global sum() to try to use a sum method first, and only do the default if that did not exist, since some classes might have better ways of summing themselves than the default. But then the only reason for having sum methods would be if there was