Mark Dickinson <dicki...@gmail.com> added the comment:

[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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33083>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to