why not add __enter__ and __exit__ to generator objects?<br>it's really a trivial addition: __enter__ returns self, __exit__ calls close().<br>it would be used to ensure close() is called when the generator is disposed,
<br>instead of doing that manually. typical usage would be:<br><br>with mygenerator() as g:<br> g.next()<br> bar = g.send("foo")<br><br><br>-tomer<br>