try/except/finally
Thomas Rachel
nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915 at spamschutz.glglgl.de
Tue Jun 10 03:27:29 EDT 2014
Am 08.06.2014 05:58 schrieb Rustom Mody:
> Some people¹ think that gotos are a code-smell.
> ¹ I am not exactly those people.
> A chap called E W Dijkstra made the statement: "Goto statement considered
> harmful" and became famous.
And became widely misunderstood. If anybody would read the whole what he
wrote, people would learn that he doesn't criticise the *use* of goto,
but he wants the *replacement* of goto with something else (like
exceptions).
As C doesn't have exceptions, goto is in many cases the simplest and
easiest way of handling errors.
Essentially, you can write both good and bad code both with and without
goto.
Thomaas
More information about the Python-list
mailing list