[prev in list] [next in list] [prev in thread] [next in thread]
List: python-dev
Subject: Re: [Python-Dev] PEP 343 - New kind of yield statement?
From: Paul Moore <p.f.moore () gmail ! com>
Date: 2005-05-19 11:54:29
Message-ID: 79990c6b0505190454703f67e3 () mail ! gmail ! com
[Download RAW message or body]
On 5/19/05, Greg Ewing <greg.ewing@canterbury.ac.nz> wrote:
> Michael Hudson wrote:
>
> > This is, to me, neat and clear. I don't find the idea that iterators
> > are tied to exactly 1 for loop an improvement (even though they
> > usually will be).
>
> To fix this in a fully backward-compatible way, we
> need some way of distinguishing generators that
> expect to be finalized.
I don't see anything that needs to be "fixed" here. Sure, generators
that expect to be finalised will not be finalised simply by the fact
that a for loop exits, but that's fine - it's not part of the spec of
a for loop that it does finalise the generator. Adding that guarantee
to a for loop is a change in spec, not a fix.
Paul.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/python-dev%40progressive-comp.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic