Skip to content

random.choice: raise IndexError on empty sequence even when not using getrandbits internally #77384

@wm75

Description

@wm75
mannequin
BPO 33203
Nosy @rhettinger, @serhiy-storchaka, @wm75, @selik
PRs
  • bpo-33203: Ensure random.choice always raises IndexError on empty sequence #6338
  • [3.7] bpo-33203: Ensure random.choice always raises IndexError on empty sequence (GH-6338) #6387
  • [3.6] bpo-33203: Ensure random.choice always raises IndexError on empty sequence (GH-6338) #6388
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/rhettinger'
    closed_at = <Date 2018-04-05.16:24:53.997>
    created_at = <Date 2018-04-01.20:04:10.759>
    labels = ['3.7', '3.8', 'type-bug', 'library']
    title = 'random.choice: raise IndexError on empty sequence even when not using getrandbits internally'
    updated_at = <Date 2018-04-05.16:24:53.997>
    user = 'https://github.com/wm75'

    bugs.python.org fields:

    activity = <Date 2018-04-05.16:24:53.997>
    actor = 'rhettinger'
    assignee = 'rhettinger'
    closed = True
    closed_date = <Date 2018-04-05.16:24:53.997>
    closer = 'rhettinger'
    components = ['Library (Lib)']
    creation = <Date 2018-04-01.20:04:10.759>
    creator = 'wolma'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 33203
    keywords = ['patch']
    message_count = 10.0
    messages = ['314787', '314835', '314837', '314840', '314869', '314870', '314957', '314990', '314991', '314992']
    nosy_count = 4.0
    nosy_names = ['rhettinger', 'serhiy.storchaka', 'wolma', 'selik']
    pr_nums = ['6338', '6387', '6388']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue33203'
    versions = ['Python 3.6', 'Python 3.7', 'Python 3.8']

    Metadata

    Metadata

    Assignees

    Labels

    3.7 (EOL)end of life3.8 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions