Message255382
The math module docs state
Except when explicitly noted otherwise, all return values are floats.
But math.factorial isn't what I would call explicit about returning int:
math.factorial(x)
Return x factorial. Raises ValueError if x is not integral or is negative.
At minimum, shouldn't the first sentence be "Return x factorial as an int."? I haven't tested on all Python versions, but math.factorial on 2.7 and 3.2 definitely return int (or long in Python 2 when necessary). |
|
Date |
User |
Action |
Args |
2015-11-25 19:44:31 | John.Yeung | set | recipients:
+ John.Yeung, docs@python |
2015-11-25 19:44:31 | John.Yeung | set | messageid: <1448480671.49.0.139605050425.issue25735@psf.upfronthosting.co.za> |
2015-11-25 19:44:31 | John.Yeung | link | issue25735 messages |
2015-11-25 19:44:31 | John.Yeung | create | |
|