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 <1560761395.48.0.0855458048325.issue37315@roundup.psfhosted.org>
In-reply-to
Content
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.
History
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: <1560761395.48.0.0855458048325.issue37315@roundup.psfhosted.org>
2019-06-17 08:49:55serhiy.storchakalinkissue37315 messages
2019-06-17 08:49:55serhiy.storchakacreate