[issue46828] math.prod can return integers (contradicts doc)

2022-02-22 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I'll add a note that the output type is determined by the input type.

--
assignee: docs@python -> rhettinger
nosy: +rhettinger
priority: normal -> low

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46828] math.prod can return integers (contradicts doc)

2022-02-22 Thread Neil Webber


New submission from Neil Webber :

The math module documentation says:

   Except when explicitly noted otherwise, all return values are floats.

But this code returns an integer:

   from math import prod; prod((1,2,3))

Doc should "explicitly note otherwise" here, I imagine. The issue being wanting 
to know that the result on all-integer input will be an exact (integer) value 
not a floating value.

--
assignee: docs@python
components: Documentation
messages: 413741
nosy: docs@python, neilwebber
priority: normal
severity: normal
status: open
title: math.prod can return integers (contradicts doc)
type: behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com