Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.85.MISMATCH!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.093 X-Spam-Evidence: '*H*': 0.81; '*S*': 0.00; 'command.': 0.09; 'oct': 0.16; 'wrote:': 0.17; 'header:In-Reply-To:1': 0.25; 'mike': 0.27; 'message-id:@mail.gmail.com': 0.27; 'prints': 0.29; 'fri,': 0.30; 'received:209.85.215.46': 0.30; 'print': 0.32; 'to:addr:python- list': 0.33; 'received:google.com': 0.34; 'pm,': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'data.': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'skip:" 10': 0.40; 'header:Received:5': 0.40; '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=ZyOE1EXNpf+VOGf/XKkJya1tdefkgOJeWXUTJ+5AbcA=; b=NmXYSdQc4+JqQ9n3kOlqD+6ida1ZsuldgdUEhQrPsGqP5czSA9rp+ZjGRzos6Cxr3X Lk/vN4nZhSqJ4YHx/ElwXd+tErOadf1kkJSzYjN1nmduwhtogNzD1KjgfJcdZ/Ir12Mc Uggb9ViBKMl6zsOj+Yu69BlVkXv9faym/ThlB9mSDFbEqRJ4+w7H6WhjWqy+t+nmiRyA ebK63qyrHUm3d634gYa00Rj3N2M9xL4itjTIP9ATJ2bWGHNcSqRhmx0IP7uh2/GhuW1s 5rxGy+wfRPBFR9qsSS6d0trhQ52jYCXwf+122P9PgqxB/W6af80jZyY1YTaaqG9cz4H/ 5qsQ== MIME-Version: 1.0 In-Reply-To: <9cfb599a-31c2-486f-95c9-d60e1d29f730@googlegroups.com> References: <7c7beccb-72e4-4cfb-958d-4a7235076fb3@googlegroups.com> <9cfb599a-31c2-486f-95c9-d60e1d29f730@googlegroups.com> From: Ian Kelly Date: Fri, 5 Oct 2012 14:10:36 -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: 6 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1349467868 news.xs4all.nl 6842 [2001:888:2000:d::a6]:50419 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:30837 On Fri, Oct 5, 2012 at 2:03 PM, Mike wrote: > I added the print command. > > It prints [] when there is no data. Change "iter(next_r, None)" to "iter(next_r, [])"