Message210512
> nitpicking a bit: negative values should probably raise a proper ValueError, no?
I think they do, with this patch. Or maybe I'm misunderstanding?
With the current form of the patch:
>>> math.factorial(10**20)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: factorial() argument outrageously large
>>> math.factorial(-10**20)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: factorial() not defined for negative values |
|
Date |
User |
Action |
Args |
2014-02-07 18:23:30 | mark.dickinson | set | recipients:
+ mark.dickinson, ncoghlan, pitrou, vstinner, skrah, gdr@garethrees.org |
2014-02-07 18:23:30 | mark.dickinson | set | messageid: <1391797410.31.0.788250139434.issue20539@psf.upfronthosting.co.za> |
2014-02-07 18:23:30 | mark.dickinson | link | issue20539 messages |
2014-02-07 18:23:30 | mark.dickinson | create | |
|