]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue 15265: document the exception raised for invalid sample sizes.
authorRaymond Hettinger <python@rcn.com>
Sun, 8 Jul 2012 23:01:53 +0000 (16:01 -0700)
committerRaymond Hettinger <python@rcn.com>
Sun, 8 Jul 2012 23:01:53 +0000 (16:01 -0700)
Doc/library/random.rst

index daf7a7617860926902d8a8ad514fc91d8ff043c6..a39b636d9c5e5a77d4a737b46145d88661fd576e 100644 (file)
@@ -150,6 +150,9 @@ Functions for sequences:
    argument.  This is especially fast and space efficient for sampling from a large
    population:  ``sample(range(10000000), 60)``.
 
+   If the sample size is larger than the population size, a :exc:``ValueError``
+   is raised.
+
 The following functions generate specific real-valued distributions. Function
 parameters are named after the corresponding variables in the distribution's
 equation, as used in common mathematical practice; most of these equations can