Well, maybe I'm looking at the wrong construct. The script needs to open up
one file that will be on the machine. It will open up other files given as
command line arguments and open files to write to. It should fail
gracefully if it cannot open the files to be read or written. The community
that will use the script has varying levels of scripting but not hordes of
Python. I'd prefer to fail with an explanation so they could fix the issue
and not just blame the script.

Leam



On Fri, Aug 23, 2013 at 6:55 AM, Chris Down <ch...@chrisdown.name> wrote:

> On 2013-08-23 01:30, Alan Gauld wrote:
> > Unless you really only want g(x) executed if there is no MyError
> exception
> > but want h(x) executed regardless.
>
> I've had that situation a few times before when using the logic "try this,
> or
> fall back to this if it doesn't work".
>
> > I'm curious, how often do others use the try/else combination?
>
> Rarely. I think I've only used it twice in recent memory.
>
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
>


-- 
Mind on a Mission <http://leamhall.blogspot.com/>
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to