Author terry.reedy
Recipients John.Yeung, docs@python, facundobatista, mark.dickinson, rhettinger, skrah, terry.reedy
Date 2015-11-27.19:53:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1448654009.7.0.457512251249.issue25735@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2015-11-27 19:53:29terry.reedysetrecipients: + terry.reedy, rhettinger, facundobatista, mark.dickinson, skrah, docs@python, John.Yeung
2015-11-27 19:53:29terry.reedysetmessageid: <1448654009.7.0.457512251249.issue25735@psf.upfronthosting.co.za>
2015-11-27 19:53:29terry.reedylinkissue25735 messages
2015-11-27 19:53:29terry.reedycreate