Decorators not worth the effort

88888 Dihedral dihedral88888 at googlemail.com
Tue Sep 18 11:14:42 EDT 2012


Chris Angelico於 2012年9月18日星期二UTC+8下午9時25分04秒寫道:
> On Tue, Sep 18, 2012 at 11:19 PM, Neil Cerutti <neilc at norwich.edu> wrote:
> 
> > On 2012-09-14, Chris Angelico <rosuav at gmail.com> wrote:
> 
> >> But then again, who actually ever needs fibonacci numbers?
> 
> >
> 
> > If it should happen that your question is not facetious:
> 
> >
> 
> > http://en.wikipedia.org/wiki/Fibonacci_number#Applications
> 
> 
> 
> It wasn't entirely facetious. I know there are a few cases where
> 
> they're needed, but I think they're calculated far more often to
> 
> demonstrate algorithms than because you actually have use of them. :)
> 
> 
> 
> Though it's as well to mention these sorts of things now and then. I
> 
> remember one time writing up something or other, and my dad was
> 
> looking over my shoulder and asked me why I'd written a little
> 
> Pascal's Triangle generator. He didn't know that it had direct
> 
> application to whatever-it-was. And unfortunately I don't remember
> 
> what I was even writing at the time :)
> 
> 
> 
> ChrisA

I would suggest one should solve the Fibnaci(50000) first and fast in Python.

Then one can think about computing c(n,k) in Python for large n.


Then



More information about the Python-list mailing list