Terry J. Reedy added the comment: I agree. In testing, I discovered this bug >>> factorial(decimal.Decimal(5.2)) 120 I don't know if this is a glitch in factorial or Decimal.
I also noticed >>> fac(fractions.Fraction(4, 1)) Traceback (most recent call last): File "<pyshell#10>", line 1, in <module> fac(fractions.Fraction(4, 1)) TypeError: an integer is required (got type Fraction) Perhaps this is due to no __int__ method. ---------- nosy: +facundobatista, mark.dickinson, rhettinger, skrah, terry.reedy _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25735> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com