Mark Dickinson <dicki...@gmail.com> added the comment:
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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35431> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com