[Python-Dev] Re-raise in absence of an "active" exception
Phillip J. Eby
pje at telecommunity.com
Sat Jun 26 08:11:51 EDT 2004
At 01:02 PM 6/26/04 +0200, Martin v. Löwis wrote:
>It seems that Guido has attempted to clarify it as "an exception is active
>until the next exception is raised, or the program terminates".
>
>However, that clarification doesn't describe the current implementation,
>atleast not for interactive mode:
>
> >>> try:
>.. 1/0
>.. except:
>.. pass
>..
> >>> raise
>Traceback (most recent call last):
> File "<stdin>", line 1, in ?
>TypeError: exceptions must be classes, instances, or strings (deprecated),
>not NoneType
>
>Here, the re-raise doesn't find an exception anymore, even
>though non has been raised...
Isn't each statement/block in the interactive interpreter run in a new frame?
More information about the Python-Dev
mailing list