diff -r f138b53ee72e Lib/random.py --- a/Lib/random.py Fri Dec 23 04:17:38 2016 -0500 +++ b/Lib/random.py Fri Dec 23 15:40:58 2016 +0100 @@ -254,7 +254,7 @@ try: i = self._randbelow(len(seq)) except ValueError: - raise IndexError('Cannot choose from an empty sequence') + raise IndexError('Cannot choose from an empty sequence') from None return seq[i] def shuffle(self, x, random=None):