[issue37178] One argument form of math.perm()

2019-06-08 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue37178] One argument form of math.perm()

2019-06-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset feaceaafe816e95c4aff15eab0bea6dc2bbfe4fd by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-37178: Allow a one argument form of math.perm() (GH-13905) (GH-13919)

[issue37178] One argument form of math.perm()

2019-06-08 Thread miss-islington
Change by miss-islington : -- pull_requests: +13792 pull_request: https://github.com/python/cpython/pull/13919 ___ Python tracker ___

[issue37178] One argument form of math.perm()

2019-06-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset e119b3d136bd94d880bce4b382096f6de3f38062 by Raymond Hettinger in branch 'master': bpo-37178: Allow a one argument form of math.perm() (GH-13905) https://github.com/python/cpython/commit/e119b3d136bd94d880bce4b382096f6de3f38062 --

[issue37178] One argument form of math.perm()

2019-06-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: It's possible the word permutations means something different to you than it does to me. The itertools.permutations() function is only one function, one that includes the default option to generate all permutations. It does the same as permute(n, r)

[issue37178] One argument form of math.perm()

2019-06-07 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +13778 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13905 ___ Python tracker

[issue37178] One argument form of math.perm()

2019-06-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I never seen a one argument form of P(n, k) in mathematics. itertools.permutations() corresponds two functions: math.perm() and math .factorial(). Unless you a going to add a new function in the itertools module equal to a one argument form of

[issue37178] One argument form of math.perm()

2019-06-06 Thread Tim Peters
Tim Peters added the comment: I agree: perm(n) should return factorial(n). -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue37178] One argument form of math.perm()

2019-06-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: perm(n, n) = factorial(n) -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue37178] One argument form of math.perm()

2019-06-06 Thread Raymond Hettinger
New submission from Raymond Hettinger : The perm() function should have a one argument form and change its signature to ``perm(n, k=None)``. This matches what itertools: itertools.permutations(iterable, r=None) Return successive r length permutations of elements in the iterable. If