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 John.Yeung, facundobatista, mark.dickinson, rhettinger, serhiy.storchaka, taleinat, terry.reedy, tim.peters
Date 2018-07-29.09:40:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
[Tal Einat]
> So we keep things consistent by supporting Decimal and Fraction inputs, but raising ValueError if the value isn't a non-negative integer?

Re-reading the issue comments, my preference is still the same as expressed in msg313936:

- no behaviour change if the input is a float
- if the input is not a float, require it to be integer-like (in the sense of implementing __index__), and complain with a TypeError if it isn't
- defer discussion of deprecating acceptance of integer-valued floats to another issue

So `math.factorial(x)` would become a `TypeError` for a `Decimal` or `Fraction` instance, whether integral or not.
Date User Action Args
2018-07-29 09:40:40mark.dickinsonsetrecipients: + mark.dickinson, tim.peters, rhettinger, terry.reedy, facundobatista, taleinat, serhiy.storchaka, John.Yeung
2018-07-29 09:40:40mark.dickinsonsetmessageid: <>
2018-07-29 09:40:40mark.dickinsonlinkissue33083 messages
2018-07-29 09:40:39mark.dickinsoncreate