Joshua Uziel <[EMAIL PROTECTED]> added the comment:

It's a simplified version, but why not something like this:

import operator
def factorial(num):
    return reduce(operator.mul, range(1, num+1))

A product() function could also be done similarly.

----------
nosy: +uzi

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2138>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to