Message322625
[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:40 | mark.dickinson | set | recipients:
+ mark.dickinson, tim.peters, rhettinger, terry.reedy, facundobatista, taleinat, serhiy.storchaka, John.Yeung |
2018-07-29 09:40:40 | mark.dickinson | set | messageid: <1532857240.06.0.56676864532.issue33083@psf.upfronthosting.co.za> |
2018-07-29 09:40:40 | mark.dickinson | link | issue33083 messages |
2018-07-29 09:40:39 | mark.dickinson | create | |
|