Skip to content

Improve error message for strings with conflicting prefixes #133197

Description

@sobolevn

Feature or enhancement

Right now it is:

>>> ft'a'
  File "<python-input-3>", line 1
    ft'a'
      ^^^
SyntaxError: invalid syntax

I propose:

>>> ft'a'
  File "<python-input-3>", line 1
    ft'a'
      ^^^
SyntaxError: can't use both "f" and "t" prefixes for strings at the same time

cc @lysnikolaou

I am working on the issue :)

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

3.14bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)topic-parsertype-featureA feature request or enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions