try/except/finally

Mark Lawrence breamoreboy at yahoo.co.uk
Tue Jun 10 14:14:18 EDT 2014


On 10/06/2014 08:27, Thomas Rachel wrote:
> 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

I entirely agree.  I find it incredible that some people find it so 
difficult to differentiate having tens or even hundreds of gotos leaping 
around willy nilly to a similar number of labels, and a similar number 
of gotos targetted at one label called SNAFU or whatever.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com





More information about the Python-list mailing list