Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.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.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:bug': 0.04; 'indicates': 0.09; 'raised,': 0.09; 'exception': 0.12; 'wrote:': 0.15; '(eg': 0.16; 'billy': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'looping': 0.16; 'pm,': 0.16; 'received:209.85.210.174': 0.19; 'received:mail- iy0-f174.google.com': 0.19; "doesn't": 0.22; 'header:In-Reply- To:1': 0.22; 'sort': 0.28; 'fri,': 0.28; 'message- id:@mail.gmail.com': 0.28; 'to:addr:python-list': 0.34; 'there': 0.34; 'useful': 0.37; 'some': 0.37; 'but': 0.37; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.38; 'data': 0.39; 'to:addr:python.org': 0.39; 'header': 0.40; 'received:209': 0.40; '10:52': 0.84; 'subject:Possible': 0.84; 'yielded': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=CWrrskdPtxjRqle9IvXJkSkbjjbzW0vl0NWJ1y7m8fA=; b=QnZbhU0zIMckXgEN52rvsf69mt+bcAd+ThEjOprJ7lO6uUFsoRToUwYeUHCSV7n2JV 9ULvxHfO6SuKug/083bX0DNYHDnajXmfv3ZXv6Fewjne+ATukZIktRIctrqaApJEAvAF AyhrZtdGNcRefKd+ug5Cr3BINUwBj06W74STQ= MIME-Version: 1.0 In-Reply-To: References: Date: Fri, 15 Jul 2011 22:58:15 +1000 Subject: Re: Possible File iteration bug From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 9 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1310734704 news.xs4all.nl 23962 [2001:888:2000:d::a6]:40778 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:9543 On Fri, Jul 15, 2011 at 10:52 PM, Billy Mays wrote: > Really what would be useful is some sort of PauseIteration Exception which > doesn't close the generator when raised, but indicates to the looping header > that there is no more data for now. > All you need is a sentinel yielded value (eg None). ChrisA