> FWIW, I expect most generators used in block-syntax to not be loops. > What would imply to support these to pass "break" to parent loop at > run-time?
I proposed this at some point during the discussion leading up to the PEP and it was boohed away as too fragile (and I agree). You're just going to have to learn to deal with it, just as you can't break out of two nested loops (but you can return from the innermost loop). > Maybe generators are not the way to go, but could be > supported natively by providing a __block__ function, very similarly to > sequences providing an __iter__ function for for-loops? Sorry, I have no idea what you are proposing here. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ 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