memoize factorial example (was Re: decorators ?)

Terry Reedy tjreedy at udel.edu
Wed Dec 8 02:14:43 EST 2004


"Tim Peters" <tim.peters at gmail.com> wrote in message 
news:1f7befae04120718513e297ae6 at mail.gmail.com...
> Terry, since you're talking about "the rabbit problem", are you sure
> you're talking about the factorial example?  It sounds like you're
> talking about the Fibonacci example.

Of course.  0! is 1 multiplied by nothing (not 0) which is 1, just as n**0 
is 1 multiplied by n 0 times and hence 1.

TJR






More information about the Python-list mailing list