Author stutzbach
Recipients belopolsky, draghuram, mark.dickinson, rhettinger, stutzbach
Date 2010-05-14.03:55:56
SpamBayes Score 6.29612e-05
Marked as misclassified No
Message-id <>
Attached is a patch to improve the unit tests for the factorial function.

To compute the check value, it keeps a running total instead of recomputing the factorial from scratch inside the loop.  It checks up to range(999) and is quite fast.  The previous code checked range(10).

It also adds the following checks:
 * 0! == 1
 * (sys.maxsize+1)! => OverflowError
 * 10e100 => OverflowError
Date User Action Args
2010-05-14 03:56:00stutzbachsetrecipients: + stutzbach, rhettinger, mark.dickinson, belopolsky, draghuram
2010-05-14 03:56:00stutzbachsetmessageid: <>
2010-05-14 03:55:58stutzbachlinkissue8692 messages
2010-05-14 03:55:57stutzbachcreate