>Through a small piece of stupid code, I found a bug in the Jython 2.0
>In a function (in a class, in a module if it matters) I had the
>following code :
> del some_var
>Originally some_var existed (a temporary local), but though some
>modifications some_var no longer existed. Trying to run the app
>yielded the following (partial) result :
>Traceback (innermost last):
> File "Main.py", line 33, in ?
> File "SessionTests\__init__.py", line 25, in ?
The stacktrace is gone in 2.1a1 ...
>Obviously the error was on my part (can't del a var that DNE), but the
>compiler should give a more informative error message (;-)). Maybe it
>should wait and give a NameError during exection, since it is possible
>that I created the name through exec() or something. (I didn't use
>any fancy dynamism in this case)
>I just checked against CPython and found this:
>>>> def foo( ):
>... del dne
>Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File "<stdin>", line 2, in foo
>UnboundLocalError: Local variable 'dne' referenced before assignment
.. but 2.1a1 still doesn't work as CPython. I have made a bugreport