Issue229252

classification
Title: try/except/else statements improperly compiled
Type: Severity: normal
Components: Jythonc compiler Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: bckfnn, bme
Priority: normal Keywords:

Created on 2001-01-18.15:27:54 by bme, last changed 2001-02-25.15:39:30 by bckfnn.

Messages
msg256 (view) Author: Brian Ericson (bme) Date: 2001-01-18.15:27:54
#!/usr/bin/python

if __name__ == "__main__":
        try:
                raise "me"
        except:
                print "In except..."
        else:
                print "In else..."

The above should execute the except block only, and does when run by jython:

[core 737] /opt/jython-2.0/jython test.py
In except...

However, when byte-compiled using jythonc and run by Java, both the except and the else block are executed:

[core 742] java -classpath ./test.jar:/opt/jython-2.0/jython.jar test
In except...
In else...

msg257 (view) Author: Finn Bock (bckfnn) Date: 2001-02-25.15:39:30
Logged In: YES 
user_id=4201

Fixed in SimpleCompiler.py 2.13;
History
Date User Action Args
2001-01-18 15:27:54bmecreate