[Python-ideas] for/else syntax
arnodel at googlemail.com
Fri Oct 2 18:00:38 CEST 2009
On 2 Oct 2009, at 15:43, Steven D'Aprano wrote:
> Perhaps there should be. Does anyone know why there isn't? It seems an
> arbitrary restriction to me, because the following pieces of code are
> not equivalent:
> # not currently legal
> if cond:
> raise ValueError
> print "no exception was raised"
> print "done"
But the above is the same as:
print "no exception was raised"
More information about the Python-ideas