Skip to content

Commit

Permalink
bpo-36546: Mark first argument as position only (GH-14363) (GH-14364)
Browse files Browse the repository at this point in the history
  • Loading branch information
miss-islington authored and rhettinger committed Jun 25, 2019
1 parent 5bf3b89 commit 210358b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ def multimode(data):
# options make for easier choices and that external packages can be
# used for anything more advanced.

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

0 comments on commit 210358b

Please sign in to comment.