This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author roysmith
Recipients docs@python, roysmith
Date 2012-07-06.17:50:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1341597045.34.0.429934948335.issue15265@psf.upfronthosting.co.za>
In-reply-to
Content
The docs don't say what happens if you call random.sample() with a population smaller than k.  Experimentally, it raises ValueError, but this should be documented.

I would have guessed it would return IndexError, by analogy to random.choice().
History
Date User Action Args
2012-07-06 17:50:45roysmithsetrecipients: + roysmith, docs@python
2012-07-06 17:50:45roysmithsetmessageid: <1341597045.34.0.429934948335.issue15265@psf.upfronthosting.co.za>
2012-07-06 17:50:44roysmithlinkissue15265 messages
2012-07-06 17:50:44roysmithcreate