[google-appengine] Re: Get Sum from datastore

2009-02-11 Thread Barry Hunter
Search the group for 'sharded counter' - the same technique should work equally well for calculating a sum. On 11/02/2009, Neversummer wrote: > > I want to get a total (sum) from an property on a given entity. I know > that sum() is not supported. Is the best method to query for all > records

[google-appengine] Re: Get Sum from datastore

2009-02-12 Thread Mark Hachey
I can't comment on "sharded counter", but just FYI, python has a built in method called "sum" that you can apply to lists or tuples, without writing your own loop. aList = [1,2,3] bTup = (1,2,3) sum(aList) or sum(bList) return 6. On Wed, Feb 11, 2009 at 7:51 PM, Barry Hunter wrote: > > Search th

[google-appengine] Re: Get Sum from datastore

2009-02-13 Thread David Symonds
On Thu, Feb 12, 2009 at 7:50 AM, Neversummer wrote: > I want to get a total (sum) from an property on a given entity. I know > that sum() is not supported. Is the best method to query for all > records on the entity in question and work through a loop adding each > records value (the value of th