From: <bc...@wo...> - 2001-08-18 15:35:43
|
[chuck clark] >I checked out the FAQ and the Jython vs. CPython docs and wasn't able to >find an answer to the following. I have this code: >def test(): > print noname > >try: > print "line 5" > print "line 6" > test() > print "line 8" > print "line 9" >except ValueError: > print "shouldn't happen." > >When I run it under python I get the following stack trace: >line 5 >line 6 >Traceback (innermost last): > File "test.py", line 7, in ? > test() > File "test.py", line 2, in test > print noname >NameError: noname > >Under Jython I get: >line 5 >line 6 >Traceback (innermost last): > File "test.py", line 10, in ? > File "test.py", line 2, in test >NameError: noname > >I lose some granularity in Jython. If I were to call the extracted method >(test in this case) several times within the try block I can't tell on >which line the failing call resulted from. It always reports from the >except line. Why is this? Is it the expected behavior? It is a bug. I have added a bug report about it and expect a fix to be included in beta1. Thanks for reporting it. regards, finn |