Skip to content

Some SyntaxWarning in strings are shown twice in the presence of SyntaxErrors #111380

Closed
@pablogsal

Description

@pablogsal

Example:

❯ ./python.exe  -Wall
Python 3.13.0a1+ (heads/main:78e6d72e38e, Oct 27 2023, 11:50:08) [Clang 15.0.0 (clang-1500.0.40.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> '\e' $
<stdin>:1: SyntaxWarning: invalid escape sequence '\e'
<stdin>:1: SyntaxWarning: invalid escape sequence '\e'
  File "<stdin>", line 1
    '\e' $
         ^
SyntaxError: invalid syntax

Linked PRs

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