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

Improving SyntaxError for unmatched parentheses #77487

Closed
serhiy-storchaka opened this issue Apr 18, 2018 · 2 comments
Closed

Improving SyntaxError for unmatched parentheses #77487

serhiy-storchaka opened this issue Apr 18, 2018 · 2 comments
Labels
3.8 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@serhiy-storchaka
Copy link
Member

BPO 33306
Nosy @serhiy-storchaka
PRs
  • bpo-33306: Improve SyntaxError messages for unbalanced parentheses. #6516
  • 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 2018-12-17.15:46:14.543>
    created_at = <Date 2018-04-18.09:22:20.386>
    labels = ['interpreter-core', 'type-feature', '3.8']
    title = 'Improving SyntaxError for unmatched parentheses'
    updated_at = <Date 2018-12-17.15:46:14.542>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2018-12-17.15:46:14.542>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-12-17.15:46:14.543>
    closer = 'serhiy.storchaka'
    components = ['Interpreter Core']
    creation = <Date 2018-04-18.09:22:20.386>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 33306
    keywords = ['patch']
    message_count = 2.0
    messages = ['315441', '332011']
    nosy_count = 1.0
    nosy_names = ['serhiy.storchaka']
    pr_nums = ['6516']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue33306'
    versions = ['Python 3.8']

    @serhiy-storchaka
    Copy link
    Member Author

    SyntaxError messages were improved recently in PyPy. [1] [2] The part of this improvement in CPython (showing an expected token) is discussed in bpo-1634034. The following PR implements other part, related to unmatched parentheses.

    Showing the number of the line containing an unmatched opening parenthesis looks as enhancement. But I'm not sure that this change is always an enhancement (in comparison with bpo-1634034). Syntax error for unmatched parentheses will be raised even if the code contains other syntax errors before unmatched parenthesis.

    [1] https://morepypy.blogspot.de/2018/04/improving-syntaxerror-in-pypy.html
    [2] https://bitbucket.org/pypy/pypy/commits/e66f24650dafbcd2ac1c443af7417eddf8e8f093

    @serhiy-storchaka serhiy-storchaka added 3.8 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement labels Apr 18, 2018
    @serhiy-storchaka
    Copy link
    Member Author

    New changeset 94cf308 by Serhiy Storchaka in branch 'master':
    bpo-33306: Improve SyntaxError messages for unbalanced parentheses. (GH-6516)
    94cf308

    @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.8 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant