Thomas Lotze wrote:
> Neither does it to me. What about
> 
> try:
>     f=file('file_here')
> except IOError: #File doesn't exist
>     error_handle
> else:
>     do_setup_code
>     do_stuff_with(f)
> 
> (Not that I'd want to defend Joel's article, mind you...)

That works.  I'm still not used to having 'else' available like that.  I 
wonder how Joel advocates managing in C++-likes that don't have a 
try/catch/else semantic.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to