Commit 17911286 authored by Raymond Hettinger's avatar Raymond Hettinger Committed by GitHub

bpo-36546: Mark first argument as position only (GH-14363)

parent 3f5b9088
...@@ -603,7 +603,7 @@ def multimode(data): ...@@ -603,7 +603,7 @@ def multimode(data):
# options make for easier choices and that external packages can be # options make for easier choices and that external packages can be
# used for anything more advanced. # 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. '''Divide *dist* into *n* continuous intervals with equal probability.
Returns a list of (n - 1) cut points separating the intervals. Returns a list of (n - 1) cut points separating the intervals.
......
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.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment