summaryrefslogtreecommitdiffstats
path: root/Lib/random.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/random.py')
-rw-r--r--Lib/random.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/random.py b/Lib/random.py
index 49b0f14..ad1c916 100644
--- a/Lib/random.py
+++ b/Lib/random.py
@@ -254,7 +254,7 @@ class Random(_random.Random):
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):