Message255479
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. |
|
Date |
User |
Action |
Args |
2015-11-27 19:53:29 | terry.reedy | set | recipients:
+ terry.reedy, rhettinger, facundobatista, mark.dickinson, skrah, docs@python, John.Yeung |
2015-11-27 19:53:29 | terry.reedy | set | messageid: <1448654009.7.0.457512251249.issue25735@psf.upfronthosting.co.za> |
2015-11-27 19:53:29 | terry.reedy | link | issue25735 messages |
2015-11-27 19:53:29 | terry.reedy | create | |
|