From: Raymond Hettinger Date: Tue, 28 Sep 2004 03:04:23 +0000 (+0000) Subject: SF bug #1033038: Misleading error message in random.choice X-Git-Tag: v2.4b1~150 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=78a5271d3e79e4ee074b832629bfff9ca1c255ef;p=thirdparty%2FPython%2Fcpython.git SF bug #1033038: Misleading error message in random.choice Added a clarifying line to the docs. --- diff --git a/Doc/lib/librandom.tex b/Doc/lib/librandom.tex index 443528dc634e..1daac6144b0c 100644 --- a/Doc/lib/librandom.tex +++ b/Doc/lib/librandom.tex @@ -129,6 +129,7 @@ Functions for sequences: \begin{funcdesc}{choice}{seq} Return a random element from the non-empty sequence \var{seq}. + If \var{seq} is empty, raises \exception{IndexError}. \end{funcdesc} \begin{funcdesc}{shuffle}{x\optional{, random}}