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 serhiy.storchaka
Recipients mark.dickinson, pablogsal, rhettinger, serhiy.storchaka, stutzbach
Date 2019-06-17.08:49:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Currently math.factorial() accepts integer-like objects (including objects with defined __index__) as well as float instances with integral value (but not arbitrary float-like objects with defined __float__). I suppose this was happen because factorial() was the first integer functions in the math module, and all other functions accepted floats at that time. See also issue7550. But now we have more pure integer functions in the math module: gcd, isqrt, comb, perm. Seems accepting floats in factorial was a mistake. Now we can fix it, and deprecate using factorial() with floats.

Initial version of factorial() accepted also non-integral numbers (except float) with defined __int__. It was fixed in issue33083.
Date User Action Args
2019-06-17 08:49:55serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, mark.dickinson, stutzbach, pablogsal
2019-06-17 08:49:55serhiy.storchakasetmessageid: <>
2019-06-17 08:49:55serhiy.storchakalinkissue37315 messages
2019-06-17 08:49:55serhiy.storchakacreate