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

Syntax Error exception dosen't print string; not informative #46033

Closed
Dude-X mannequin opened this issue Dec 23, 2007 · 5 comments
Closed

Syntax Error exception dosen't print string; not informative #46033

Dude-X mannequin opened this issue Dec 23, 2007 · 5 comments
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@Dude-X
Copy link
Mannequin

Dude-X mannequin commented Dec 23, 2007

BPO 1692
Nosy @gvanrossum, @kbkaiser
Files
  • pythonrun.c.patch
  • 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/kbkaiser'
    closed_at = <Date 2008-01-05.04:33:21.982>
    created_at = <Date 2007-12-23.21:23:25.211>
    labels = ['interpreter-core', 'type-bug']
    title = "Syntax Error exception dosen't print string; not informative"
    updated_at = <Date 2008-01-06.22:29:44.322>
    user = 'https://bugs.python.org/Dude-X'

    bugs.python.org fields:

    activity = <Date 2008-01-06.22:29:44.322>
    actor = 'admin'
    assignee = 'kbk'
    closed = True
    closed_date = <Date 2008-01-05.04:33:21.982>
    closer = 'kbk'
    components = ['Interpreter Core']
    creation = <Date 2007-12-23.21:23:25.211>
    creator = 'Dude-X'
    dependencies = []
    files = ['9069']
    hgrepos = []
    issue_num = 1692
    keywords = ['patch']
    message_count = 5.0
    messages = ['58977', '59108', '59278', '59279', '59280']
    nosy_count = 3.0
    nosy_names = ['gvanrossum', 'kbk', 'Dude-X']
    pr_nums = []
    priority = 'high'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue1692'
    versions = ['Python 3.0']

    @Dude-X
    Copy link
    Mannequin Author

    Dude-X mannequin commented Dec 23, 2007

    Python 3.0 doesn't print the string with the carat underneath when
    there is a syntax error.

    >>> if x
    SyntaxError: invalid syntax (<stdin>, line1)
    >>> if (x=5):
    SyntaxError: invalid syntax (<stdin>, line 1)

    Python 2.x behavior:

    >>> if (x=5): pass
      File "<stdin>", line 1
        if (x=5): pass
    
    >>> if x
      File "<stdin>", line 1
        if x

    @Dude-X Dude-X mannequin added the type-bug An unexpected behavior, bug, or error label Dec 23, 2007
    @tiran tiran added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Jan 1, 2008
    @gvanrossum
    Copy link
    Member

    Yup. Same if the exception comes in a file. I'll try to free up some
    cycles to look into this. Thanks for the report!

    @gvanrossum gvanrossum self-assigned this Jan 2, 2008
    @kbkaiser
    Copy link
    Contributor

    kbkaiser commented Jan 5, 2008

    This short patch appears to fix the problem, please review.

    @gvanrossum
    Copy link
    Member

    Yup, thanks! Can you submit it and close this?

    @kbkaiser
    Copy link
    Contributor

    kbkaiser commented Jan 5, 2008

    r59729

    @kbkaiser kbkaiser closed this as completed Jan 5, 2008
    @kbkaiser kbkaiser assigned kbkaiser and unassigned gvanrossum Jan 5, 2008
    @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
    interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants