![](https://secure.gravatar.com/avatar/60a2f1855ca0d8aac3fa75a57233a3f1.jpg?s=120&d=mm&r=g)
On 2010-08-26, at 12:20 PM, Scott Dial wrote:
On 8/26/2010 11:00 AM, Yury Selivanov wrote:
If we decide to postpone this feature till Python 3.3, than we'll push it all back The change is tiny, but it means really a lot.
AFAICT, this change was the most controversial part of PEP 380.
PS I'm attaching a patch to the letter; it's far from ideal state, but contains the GeneratorReturn exception, code to raise it and the corresponding unittests.
I believe overloading StopIteration for this purpose was considered more acceptable than creating a new exception.
Whatever the Python community decides. I was trying to make several points regarding the problem, and proposed a solution which in my opinion is slightly better than one described in the pep.
BTW, attaching patches to emails on this list is generally the best way to have few look at your patch. :-p
Hm, my mailing client clearly indicates that the patch has been attached and sent. In any case, here is a direct link: http://dl.dropbox.com/u/21052/generators_return.patch - Yury