Kaydet (Commit) d2cbd905 authored tarafından Sandro Tosi's avatar Sandro Tosi

merge with 3.2

...@@ -315,7 +315,7 @@ Basic usage:: ...@@ -315,7 +315,7 @@ Basic usage::
>>> random.sample([1, 2, 3, 4, 5], 3) # Three samples without replacement >>> random.sample([1, 2, 3, 4, 5], 3) # Three samples without replacement
[4, 1, 5] [4, 1, 5]
A common task is to make a :func:`random.choice` with weighted probababilites. A common task is to make a :func:`random.choice` with weighted probabilities.
If the weights are small integer ratios, a simple technique is to build a sample If the weights are small integer ratios, a simple technique is to build a sample
population with repeats:: population with repeats::
......
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