Commit f45e858c authored by Raymond Hettinger's avatar Raymond Hettinger

merge

parents 426b140f bb2839b6
...@@ -254,7 +254,7 @@ class Random(_random.Random): ...@@ -254,7 +254,7 @@ class Random(_random.Random):
try: try:
i = self._randbelow(len(seq)) i = self._randbelow(len(seq))
except ValueError: except ValueError:
raise IndexError('Cannot choose from an empty sequence') raise IndexError('Cannot choose from an empty sequence') from None
return seq[i] return seq[i]
def shuffle(self, x, random=None): def shuffle(self, x, random=None):
......
...@@ -714,6 +714,9 @@ Library ...@@ -714,6 +714,9 @@ Library
- Issue 28923: Remove editor artifacts from Tix.py. - Issue 28923: Remove editor artifacts from Tix.py.
- Issue #29055: Neaten-up empty population error on random.choice()
by suppressing the upstream exception.
- Issue #28871: Fixed a crash when deallocate deep ElementTree. - Issue #28871: Fixed a crash when deallocate deep ElementTree.
- Issue #19542: Fix bugs in WeakValueDictionary.setdefault() and - Issue #19542: Fix bugs in WeakValueDictionary.setdefault() and
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment