Skip to content

Commit 1791128

Browse files
authored
bpo-36546: Mark first argument as position only (GH-14363)
1 parent 3f5b908 commit 1791128

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Lib/statistics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ def multimode(data):
603603
# options make for easier choices and that external packages can be
604604
# used for anything more advanced.
605605

606-
def quantiles(dist, *, n=4, method='exclusive'):
606+
def quantiles(dist, /, *, n=4, method='exclusive'):
607607
'''Divide *dist* into *n* continuous intervals with equal probability.
608608
609609
Returns a list of (n - 1) cut points separating the intervals.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
The *dist* argument for statistics.quantiles() is now positional only. The
2+
current name doesn't reflect that the argument can be either a dataset or a
3+
distribution. Marking the parameter as positional avoids confusion and
4+
makes it possible to change the name later.

0 commit comments

Comments
 (0)