At 07:27 PM 5/3/05 -0400, Phillip J. Eby wrote:
>Modifying the spec is potentially more controversial, however; it'll have
>to go past the Web-SIG, and I assume the first thing that'll be asked is,
>"Why aren't generators getting a close() method then?", so I figured I
>should ask that question first.

You know what, never mind.  I'm still going to write the Web-SIG so they 
know the change is coming, but this is really a very minor thing; just a 
feature we won't get "for free" as a side effect of PEP 325.

Your decorator idea is a trivial solution, but it would also be trivial to 
allow WSGI server implementations to call __exit__ on generators.  None of 
this affects existing code in the field, because today you can't write a 
try/finally in a generator anyway.  Therefore, nobody is relying on this 
feature, therefore it's basically moot.

_______________________________________________
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/archive%40mail-archive.com

Reply via email to