Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.052 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'none)': 0.07; 'index': 0.13; 'assumed,': 0.16; 'col': 0.16; 'indexerror:': 0.16; 'oct': 0.16; 'sentinel': 0.16; 'wrote:': 0.17; 'header:In-Reply-To:1': 0.25; '(most': 0.27; 'am,': 0.27; 'mike': 0.27; 'message- id:@mail.gmail.com': 0.27; 'maybe': 0.29; 'that.': 0.30; 'fri,': 0.30; 'file': 0.32; 'traceback': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'list': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'does': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'end': 0.40; 'range': 0.60; 'more': 0.63; 'here': 0.65; '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=NB5d48WJqC5t72gJdkFFtTcJtg1oHNXM9eePRHwnMdo=; b=QUiFERMwTnyNASWW2VacFR87tTowp92j/cKrIsG4WZSQQK5DrdxpBQZlzZdgBGiAeu atyuTQuKvBXrw9POtgSWk9gmYSnoaAKAL+z/feBmLyWpSHK8nwL5ctUev5s7fdlgP6xO XkpjtBdd1wHUxHZlaaGvdHU1JJX+QQhMyu4RNtOJeA09FgBXsMf/c7Ltwse8tWcW88Hy mn3hCXsIDcwlo6YCqCO0LIk7W/axKZfMkx199NoQ5aGC/Jf/UV3RBgFQoQ3CsqOgzsK2 Eau3aL3s218eRHmlqS+DawZpfPGRck5AWviH1OQ0E3TP0EvvDFaOmNLGkaggm2aWoqeE p0Ww== MIME-Version: 1.0 In-Reply-To: <12a372ba-8809-4fff-bca5-55a03e61ca82@googlegroups.com> References: <7c7beccb-72e4-4cfb-958d-4a7235076fb3@googlegroups.com> <12a372ba-8809-4fff-bca5-55a03e61ca82@googlegroups.com> From: Ian Kelly Date: Fri, 5 Oct 2012 13:29:04 -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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1349465378 news.xs4all.nl 6921 [2001:888:2000:d::a6]:60053 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:30831 On Fri, Oct 5, 2012 at 7:39 AM, Mike wrote: > Sorry about that. Here you go > > Traceback (most recent call last): > File "test.py", line 17, in > total = sum(float(col.value) for r in iter(next_r, None) for col in r[0].columns.itervalues()) > File "test.py", line 17, in > total = sum(float(col.value) for r in iter(next_r, None) for col in r[0].columns.itervalues()) > IndexError: list index out of range Maybe the sentinel value is not None as I assumed, and it's overrunning the end of the data? What does client.scannerGet return when there is no more data?