Python in game development? + recFib
Darrell Gallion
darrell at dorb.com
Wed Aug 30 21:30:45 EDT 2000
Ok the last solution was overly complicated.
def recfib (nn):
val=[0,1L]
for n in xrange(1,nn):
val.append(val[-1]+val[-2])
val=val[-2:]
return val[-1]
Converted that from 'C' found in the book "Number Theory"
--Darrell
----- Original Message -----
From: "Darrell Gallion" <darrell at dorb.com>
> Hacked up Christian's code to get past the stack limit.
> Skipped locking on things like the cache since it's a write once kind of
> thing.
> Guess hacking can pay off.
>
> --Darrell
>
More information about the Python-list
mailing list