Le 24/10/2011 22:09, MRAB a écrit :
but for choice(seq) it says:
Ah of course, I should have checked there
"""If seq is empty, raises IndexError."""
>
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
On 24/10/2011 20:26, candide wrote:
Where is documented the behaviour of the standard function randrange in
the case of an empty list ? for instance randrange(42,33) ? May I rely
on an ValueError type error?
It's the same back to at least Python 2.5, so you can probably rely on
that behaviour.
Where is documented the behaviour of the standard function randrange in
the case of an empty list ? for instance randrange(42,33) ? May I rely
on an ValueError type error?
--
http://mail.python.org/mailman/listinfo/python-list