Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:
For what its worth, there are concrete, practical applications for binomial coefficients with negative arguments. They are used in fractional calculus https://nrich.maths.org/1365 which in turn has applications in physics, chemistry and other sciences: https://en.wikipedia.org/wiki/Fractional_calculus#Applications Take that however you see fit :-) My own preference is for a comb() function that returns 0 for out of bounds values (e.g. "choose 5 items from 4"), and a seperate binomial() function that accepts any positive or negative integer values. Even I think that fractional and complex arguments are probably a bit too exotic for the std lib -- that's Mathematica territory. And yes, Mathematica does accept fractional and complex arguments to the choose() function. https://www.wolframalpha.com/input/?i=choose%28sqr%28-3.5%29,+sqrt%28-4%2Bi%29%29 ---------- _______________________________________ 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