这是indexloc提供的服务,不要输入任何密码
Skip to content

SyntaxError messages just say 'invalid syntax' instead of the provided hints #54

@Uchiha-Senju

Description

@Uchiha-Senju

Issue

When printing a syntax error, the exception includes a help message in the msg attribute, but the message in args[0] is printed instead, which is almost always "invalid syntax" and unhelpful.

Currently:
image

Ideally :
image

Suggested Fix :

Changing line 682 in init.py from exception_value.args = [exception_value.args[0]] to exception_value.args = [exception_value.msg]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions