<div dir="ltr"><br><br><div class="gmail_quote">On Thu, Nov 10, 2011 at 3:28 PM, Steven D'Aprano <span dir="ltr"><<a href="mailto:steve@pearwood.info">steve@pearwood.info</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">Yuval Greenfield wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
"Try...else..." doesn't make any sense without the except jn my eyes. The<br>
"else" has to conjugate something.<br>
</blockquote>
<br>
<br></div>
We already have while...else and for...else blocks in Python. The principle is the same:<br>
<br>
<br>
while condition():<br>
...<br>
else:<br>
# Run the else block unless we exit the while block with a break.<br>
...<br><br></blockquote><div><br></div><div>I'd rename or remove for/else and while/else from the language. Guido has said "we probably should not do more of these".</div><div><br></div><div><a href="http://mail.python.org/pipermail/python-ideas/2009-October/006083.html">http://mail.python.org/pipermail/python-ideas/2009-October/006083.html</a></div>
<div><br></div><div>Though these constructs are technically useful, even experts who read the documentation misunderstand or misuse them. People who are new to the language will be even worse.</div><div><br></div><div>--Yuval</div>
</div></div>