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: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=78a5271d3e79e4ee074b832629bfff9ca1c255ef;p=python 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 443528dc63..1daac6144b 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}}