diff options
author | Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> | 2018-04-05 15:19:44 (GMT) |
---|---|---|
committer | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2018-04-05 15:19:44 (GMT) |
commit | 091e95e9004b794280ab35becec2c3e30dd5e96e (patch) | |
tree | 72be905acc5dd7a26b7a90a3d14efb58b99cbcad /Misc | |
parent | 74940913d26d9f94b8572eca794369841fa6d9b6 (diff) | |
download | cpython-091e95e9004b794280ab35becec2c3e30dd5e96e.zip cpython-091e95e9004b794280ab35becec2c3e30dd5e96e.tar.gz cpython-091e95e9004b794280ab35becec2c3e30dd5e96e.tar.bz2 |
bpo-33203: Ensure random.choice always raises IndexError on empty sequence (GH-6338)
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2018-04-05-11-09-45.bpo-33203.Hje9Py.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2018-04-05-11-09-45.bpo-33203.Hje9Py.rst b/Misc/NEWS.d/next/Library/2018-04-05-11-09-45.bpo-33203.Hje9Py.rst new file mode 100644 index 0000000..ab6d17b --- /dev/null +++ b/Misc/NEWS.d/next/Library/2018-04-05-11-09-45.bpo-33203.Hje9Py.rst @@ -0,0 +1,3 @@ +``random.Random.choice()`` now raises ``IndexError`` for empty sequences +consistently even when called from subclasses without a ``getrandbits()`` +implementation. |