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 mark.dickinson
Recipients gdr@garethrees.org, mark.dickinson, ncoghlan, pitrou, skrah, vstinner
Date 2014-02-07.18:23:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1391797410.31.0.788250139434.issue20539@psf.upfronthosting.co.za>
In-reply-to
Content
> 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
History
Date User Action Args
2014-02-07 18:23:30mark.dickinsonsetrecipients: + mark.dickinson, ncoghlan, pitrou, vstinner, skrah, gdr@garethrees.org
2014-02-07 18:23:30mark.dickinsonsetmessageid: <1391797410.31.0.788250139434.issue20539@psf.upfronthosting.co.za>
2014-02-07 18:23:30mark.dickinsonlinkissue20539 messages
2014-02-07 18:23:30mark.dickinsoncreate