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 <1532857240.06.0.56676864532.issue33083@psf.upfronthosting.co.za>
In-reply-to
Content
[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.
History
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: <1532857240.06.0.56676864532.issue33083@psf.upfronthosting.co.za>
2018-07-29 09:40:40mark.dickinsonlinkissue33083 messages
2018-07-29 09:40:39mark.dickinsoncreate