Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading error message for except with missing parens (3.10.a5) #87315

Closed
aroberge mannequin opened this issue Feb 6, 2021 · 3 comments
Closed

Misleading error message for except with missing parens (3.10.a5) #87315

aroberge mannequin opened this issue Feb 6, 2021 · 3 comments
Labels
3.10 type-bug

Comments

@aroberge
Copy link
Mannequin

@aroberge aroberge mannequin commented Feb 6, 2021

BPO 43149
Nosy @aroberge, @lysnikolaou, @pablogsal, @miss-islington
PRs
  • #24467
  • #25996
  • #25997
  • 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 2021-02-07.18:42:41.526>
    created_at = <Date 2021-02-06.22:54:08.266>
    labels = ['type-bug', '3.10']
    title = 'Misleading error message for except with missing parens (3.10.a5)'
    updated_at = <Date 2021-05-09.21:14:08.771>
    user = 'https://github.com/aroberge'

    bugs.python.org fields:

    activity = <Date 2021-05-09.21:14:08.771>
    actor = 'pablogsal'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-02-07.18:42:41.526>
    closer = 'pablogsal'
    components = []
    creation = <Date 2021-02-06.22:54:08.266>
    creator = 'aroberge'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 43149
    keywords = ['patch']
    message_count = 3.0
    messages = ['386570', '386601', '393337']
    nosy_count = 4.0
    nosy_names = ['aroberge', 'lys.nikolaou', 'pablogsal', 'miss-islington']
    pr_nums = ['24467', '25996', '25997']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue43149'
    versions = ['Python 3.10']

    @aroberge
    Copy link
    Mannequin Author

    @aroberge aroberge mannequin commented Feb 6, 2021

    The following:

    try:
    pass
    except ValueError, NameError as err:
    pass

    results in:

        except ValueError, NameError as err:
                         ^
    SyntaxError: expected ':'

    However, what is missing here are some parentheses surrounding the exception types.

    @aroberge aroberge mannequin added 3.10 type-bug labels Feb 6, 2021
    @pablogsal
    Copy link
    Member

    @pablogsal pablogsal commented Feb 7, 2021

    New changeset 206cbda by Pablo Galindo in branch 'master':
    bpo-43149: Improve error message for exception group without parentheses (GH-24467)
    206cbda

    @pablogsal
    Copy link
    Member

    @pablogsal pablogsal commented May 9, 2021

    New changeset 9a0e65c by Miss Islington (bot) in branch '3.10':
    bpo-43149: Correct the syntax error message for multiple exception types (GH-25996) #70185)
    9a0e65c

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.10 type-bug
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant