Message331281
There's also the question of what inputs should be considered valid: `binomial(n, k)` for `k > n` should either return 0 or be a `ValueError`, but which? Same question for `k < 0`. There's a symmetry argument for allowing `k < 0` if you allow `k > n`, but I can't think of pragmatic reasons to allow `k < 0`, while allowing `k > n` _does_ seem potentially useful.
Note that this needs fixing with both of the code snippets shown so far: they both return 1 for k > n. |
|
| Date |
User |
Action |
Args |
| 2018-12-07 09:03:05 | mark.dickinson | set | recipients:
+ mark.dickinson, tim.peters, rhettinger, steven.daprano, kellerfuchs |
| 2018-12-07 09:03:05 | mark.dickinson | set | messageid: <[email protected]> |
| 2018-12-07 09:03:05 | mark.dickinson | link | issue35431 messages |
| 2018-12-07 09:03:05 | mark.dickinson | create | |
|