mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
merge from 3.3
Improve the docstring of random.shuffle. Inform users not to provide int arg. Addresses issue #14927
This commit is contained in:
commit
b4055f294e
1 changed files with 7 additions and 0 deletions
|
@ -257,9 +257,16 @@ class Random(_random.Random):
|
||||||
def shuffle(self, x, random=None, int=int):
|
def shuffle(self, x, random=None, int=int):
|
||||||
"""Shuffle list x in place, and return None.
|
"""Shuffle list x in place, and return None.
|
||||||
|
|
||||||
|
<<<<<<< local
|
||||||
Optional argument random is a 0-argument function returning a
|
Optional argument random is a 0-argument function returning a
|
||||||
random float in [0.0, 1.0); if it is the default None, the
|
random float in [0.0, 1.0); if it is the default None, the
|
||||||
standard random.random will be used.
|
standard random.random will be used.
|
||||||
|
=======
|
||||||
|
Optional arg random is a 0-argument function returning a random
|
||||||
|
float in [0.0, 1.0); by default, the standard random.random.
|
||||||
|
|
||||||
|
Do not supply the 'int' argument.
|
||||||
|
>>>>>>> other
|
||||||
"""
|
"""
|
||||||
|
|
||||||
randbelow = self._randbelow
|
randbelow = self._randbelow
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue