Author John.Yeung
Recipients John.Yeung, docs@python
Date 2015-11-25.19:44:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1448480671.49.0.139605050425.issue25735@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2015-11-25 19:44:31John.Yeungsetrecipients: + John.Yeung, docs@python
2015-11-25 19:44:31John.Yeungsetmessageid: <1448480671.49.0.139605050425.issue25735@psf.upfronthosting.co.za>
2015-11-25 19:44:31John.Yeunglinkissue25735 messages
2015-11-25 19:44:31John.Yeungcreate