On Tue, 14 Jun 2005 10:09:30 +0100, "Richard Lewis"
<[EMAIL PROTECTED]> said:
> Hi there,
>
> Is it possible to have an 'except' case which passes control back to the
> point after the exception occurred?
>
> e.g.
>
> # a function to open the file
> # raises FileLockedException is file contains
Richard Lewis schreef:
> Is it possible to have an 'except' case which passes control back to the
> point after the exception occurred?
No, not in Python. The concept has however been discussed, under the
name "resumable exceptions".
http://www.google.com/search?num=100&q=%22resumable+exceptions%
>> Is it possible to have an 'except' case which passes control back to
>> the point after the exception occurred?
Peter> Basically no, although I could imagine some gross hack with the
Peter> frame info and some bytecode hacks that effect a "goto".
Someone (I forget who) posted
Richard Lewis wrote:
> Is it possible to have an 'except' case which passes control back to the
> point after the exception occurred?
Basically no, although I could imagine some gross hack with the frame
info and some bytecode hacks that effect a "goto". Basically the stack
frame gets unwound t
Why does the first function return True? Shouldn't it return the file
content? That's at least what the function name implies.
You call the second function open_command() which returns a boolean.
Feels wrong.
Where you have written "How?" I suggest that you replace that by:
return open_file("foo.b
On Tue, 14 Jun 2005 10:09:30 +0100,
"Richard Lewis" <[EMAIL PROTECTED]> wrote:
> Hi there,
> Is it possible to have an 'except' case which passes control back to the
> point after the exception occurred?
Not that I can think of.
[ example of "interrupting" a file-reading function in order to ask