On Mon, Sep 15, 2003 at 11:26:27AM -0400, Phillip J. Eby wrote:
i = iter(something) while 1: try: j=i.next() except StopIteration: break
(...) is already complex enough as a mental model.
Makes sense. Then let's make sure, if both 'with' and 'yield within try:finally' are accepted, that they are compatible, e.g. by having and __exit__() method on generators (and not just a close()).