This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dtorp
Recipients alanmcintyre, dtorp, mark.dickinson, rhettinger
Date 2008-02-19.08:28:09
SpamBayes Score 0.138769
Marked as misclassified No
Message-id <>
Mr. Dickinson thank you for doing this.  I do not know how to help with 
a patch.  If it helps, here is the code I use in python:

def factorial(n, _known=[1]):
    assert isinstance(n, int), "Need an integer. This isn't a gamma"
    assert n >= 0, "Sorry, can't factorilize a negative"
    assert n < 1000, "No way! That's too large"
        return _known[n]
    except IndexError:
    for i in range(len(_known), n+1):
        _known.append(_known[-1] * i)
    return _known[n]

When the assertions are turned-off, this runs pretty fast.
Date User Action Args
2008-02-19 08:28:11dtorpsetspambayes_score: 0.138769 -> 0.138769
recipients: + dtorp, rhettinger, mark.dickinson, alanmcintyre
2008-02-19 08:28:10dtorpsetspambayes_score: 0.138769 -> 0.138769
messageid: <>
2008-02-19 08:28:10dtorplinkissue2138 messages
2008-02-19 08:28:09dtorpcreate