Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:
Sorry for the late reply, I missed Tim's comment when it first came through. > Please resist pointless feature creep. The original report was about > comb(n, k) for integer n and k with 0 <= k <= n and that's all. > Everyone who commented appeared to agree they'd find that useful. > > But nobody has said [...] that they'd find perm(n, k) USEFUL. I'm not going to argue for binomial coefficients with negative n, but I find it hard to imagine anyone needing combinations without also needing permutations, and I didn't think it was necessary to explicitly say so. But since you insist, I'll say so: I would find it useful to have a function to compute the number of permutations of n taking k at a time. My perspective may be biased from my experience with secondary school maths, where they are taught together, but providing one without the other strikes me as weird as providing tan without sin and cos. There are other functions from combinatorics which I personally use, like derangements, but I know when I'm pushing my luck :-) ---------- _______________________________________ 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