[Python-Dev] "with" use case: replacing a file

Nick Coghlan ncoghlan at gmail.com
Fri May 13 11:23:52 CEST 2005


Guido van Rossum wrote:
>>P.S. The points regarding non-local flow control in Joel Spolsky's latest Joel
>>on Software article (especially the links at the end) may have had something to
>>do with my change of heart. . .
> 
> 
> I'm a big fan of Joel. Care to share the specific URL for the article
> you're referring to?
> 

Sorry about that (I was in a hurry this morning). It was here:
http://www.joelonsoftware.com/articles/Wrong.html

The link of particular interest regarding exception handling was this one:
http://blogs.msdn.com/oldnewthing/archive/2005/01/14/352949.aspx

Some interesting points about some of the cons of exception based code (at least 
some of which relate to what we're dealing with in factoring out finally 
clauses, and C++ deals with via scope-based destruction).

Anyway, it made me realise that having any callables you invoke potentially 
raise exceptions is already tricky to deal with, and allowing a different call 
to potentially *suppress* those exceptions is a recipe for serious confusion.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://boredomandlaziness.blogspot.com


More information about the Python-Dev mailing list