Message333398
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. |
|
Date |
User |
Action |
Args |
2019-01-10 16:29:20 | jfine2358 | set | recipients:
+ jfine2358, vstinner, josh.r, remi.lapeyre |
2019-01-10 16:29:18 | jfine2358 | set | messageid: <1547137758.19.0.546761094095.issue35698@roundup.psfhosted.org> |
2019-01-10 16:29:18 | jfine2358 | link | issue35698 messages |
2019-01-10 16:29:18 | jfine2358 | create | |
|