Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.060 X-Spam-Evidence: '*H*': 0.88; '*S*': 0.00; 'none)': 0.07; ':-p': 0.16; 'col': 0.16; 'oct': 0.16; 'wrote:': 0.17; 'thu,': 0.17; 'header :In-Reply-To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'pm,': 0.35; 'received:209.85': 0.35; 'should': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'total': 0.65; 'to:name:python': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=liiSWF5rLp2FuMqTP4XLyTqMvuerFUnTaGpcHBb9RYQ=; b=iqrlzOhIynyWN7GPIVI2nw6HPx2JaABnYoIhOqo/MiaWoTjraY5BgC4Dwx36z8w0+5 lYLSIjXshnpl0EGZKXKaSOVom7R7p/V7sNYG0A2o0K4+LSOaDtmCLJy6y/jbCiMW6mcj Bx1BG4l4JuHg2YvzqoPFze+IvZpDeQNcJLdIeWAuB3DSL8iuwh37x1m5by2UyR9zP23E gRifcI11CNbzObzIWRNUukc/sQxIuY+3nnTZ6VR/hpm9VDkYGpkZc5DE5Y37ihjBN8pV 0ffvRmx0R+0XMyqtYLbES7Da9S+4G2h9KbxAaNahwyJ43klYSV8WzzBz9cP0ZfiOD7bB sW2w== MIME-Version: 1.0 In-Reply-To: References: <7c7beccb-72e4-4cfb-958d-4a7235076fb3@googlegroups.com> From: Ian Kelly Date: Thu, 4 Oct 2012 15:05:48 -0600 Subject: Re: sum function To: Python Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 7 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1349384780 news.xs4all.nl 6860 [2001:888:2000:d::a6]:38197 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:30746 On Thu, Oct 4, 2012 at 3:04 PM, Ian Kelly wrote: > scanner = client.scannerOpenWithStop("tab", "10", "1000", ["cf:col1"]) > next_r = itertools.partial(client.scannerGet, scanner) > total = sum(float(col.value) for r in iter(next_r, None) for col in > r.itervalues()) That should be "functools" above, not "itertools". :-P