Skip to content

Add unicode tips for SyntaxError suggestion #148649

@Locked-chess-official

Description

@Locked-chess-official

Feature or enhancement

Proposal:

Now we have:

>>> impοrt abc
  File "<python-input-0>", line 1
    impοrt abc
    ^^^^^^
SyntaxError: invalid syntax. Did you mean 'import'?

The ο(U+03BF) and o(ascii) are similar in eyes. Maybe it is better to add the unicode tips when the SyntaxError caused by unicode characters.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    pendingThe issue will be closed if no feedback is providedstdlibStandard Library Python modules in the Lib/ directorytopic-unicodetype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions