Message225327
Thank you for the extensive examples, but I'm afraid this is not a bug.
In your code, "result" is a local variable, which means it only exists inside the fib() function. When you try inspecting "result", it fails because there is no global variable "result".
Try doing this instead:
result = fib(100)
result
result[3]
and it should work as you expect. (By the way, it doesn't matter if the local variable inside the fib() function and the global variable are different names or the same, in both cases they are considered different.) |
|
Date |
User |
Action |
Args |
2014-08-15 00:29:59 | steven.daprano | set | recipients:
+ steven.daprano, rezashahrzad |
2014-08-15 00:29:59 | steven.daprano | set | messageid: <1408062599.9.0.115961522727.issue22202@psf.upfronthosting.co.za> |
2014-08-15 00:29:59 | steven.daprano | link | issue22202 messages |
2014-08-15 00:29:59 | steven.daprano | create | |
|