Skip to content

Misleading "not iterable" Error Message when generator return a "simple" type, and a tuple is expected #76440

Description

@Camion
mannequin
BPO 32259
Nosy @rhettinger, @terryjreedy, @ericvsmith, @stevendaprano, @bitdancer, @serhiy-storchaka
PRs
  • bpo-32259: Make a TypeError message when unpack non-iterable more specific. #4903
  • Files
  • issue-32259-iterable-unpackable.patch: sample patch for the changes locations. The actual message wording might have to be adapted according with discussions.
  • 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 = None
    closed_at = <Date 2017-12-26.10:32:10.279>
    created_at = <Date 2017-12-09.12:10:32.324>
    labels = ['interpreter-core', 'type-feature', '3.7']
    title = 'Misleading "not iterable" Error Message when generator return a "simple" type, and a tuple is expected'
    updated_at = <Date 2017-12-26.10:32:10.258>
    user = 'https://bugs.python.org/Camion'

    bugs.python.org fields:

    activity = <Date 2017-12-26.10:32:10.258>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-12-26.10:32:10.279>
    closer = 'serhiy.storchaka'
    components = ['Interpreter Core']
    creation = <Date 2017-12-09.12:10:32.324>
    creator = 'Camion'
    dependencies = []
    files = ['47330']
    hgrepos = []
    issue_num = 32259
    keywords = ['patch']
    message_count = 37.0
    messages = ['307892', '307896', '307899', '307900', '307904', '307937', '307942', '307944', '307946', '307951', '307953', '307955', '307969', '307976', '307987', '307991', '307992', '307994', '307999', '308002', '308003', '308004', '308443', '308472', '308477', '308490', '308496', '308556', '308584', '308585', '308596', '308612', '308615', '308620', '308624', '308625', '309057']
    nosy_count = 7.0
    nosy_names = ['rhettinger', 'terry.reedy', 'eric.smith', 'steven.daprano', 'r.david.murray', 'serhiy.storchaka', 'Camion']
    pr_nums = ['4903']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue32259'
    versions = ['Python 3.7']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.7 (EOL)end of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions