Message256

Author bme
Recipients
Date 2001-01-18.15:27:54
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
#!/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...

History
Date User Action Args
2008-02-20 17:16:47adminlinkissue229252 messages
2008-02-20 17:16:47admincreate