rich murphy schreef: > This not fine: >>>> fibo.fib2(100) > [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] > > > When I enter "fibo.fib2(100)", I get the following: > >>>> fibo.fib2(100) > Traceback (most recent call last): > File "<stdin>", line 1, in ? > File "C:\Python24\fibo.py", line 11, in fib2 > while b < n: > UnboundLocalError: local variable 'b' referenced before assignment
Can you show the code of fib2? It looks like there's an error in it, but without the code it's hard to say anything about it. > Both Python2.4 and 2.5 are behaving the same. I will also try to create > the file with Vi editor. If by Vi you mean Vim, that's my favorite editor for editing Python code, with Idle second. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list