Author jfine2358
Recipients jfine2358, josh.r, remi.lapeyre, vstinner
Date 2019-01-10.16:29:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1547137758.19.0.546761094095.issue35698@roundup.psfhosted.org>
In-reply-to
Content
Here's the essence of a patch.

Suppose the input is Python integers, and the output is a mathematical integer. In this case we can make the output a Python integer by using the helper function

>>> def wibble(p, q):
...     if type(p) == type(q) == int and p%q == 0:
...         return p // q
...     else:
...         return p / q
... 
>>> wibble(4, 2)
2
>>> wibble(3, 2)
1.5

This will also work for average.
History
Date User Action Args
2019-01-10 16:29:20jfine2358setrecipients: + jfine2358, vstinner, josh.r, remi.lapeyre
2019-01-10 16:29:18jfine2358setmessageid: <1547137758.19.0.546761094095.issue35698@roundup.psfhosted.org>
2019-01-10 16:29:18jfine2358linkissue35698 messages
2019-01-10 16:29:18jfine2358create