Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improve error message for unterminated strings with escapes #100445

Closed
Labels
type-featureA feature request or enhancement
@hauntsaninja

Description

@hauntsaninja

Inspired by#55688 and#94768.

Currently, this code raises the following error:

>>> "asdf\"  File "<stdin>", line 1    "asdf\"    ^SyntaxError: unterminated string literal (detected at line 1)

Maybe there's room to make this error message more helpful, to make the source of the error more obvious for users unfamiliar with escapes. Could the following be better?

>>> "asdf\"  File "<stdin>", line 1    "asdf\"    ^SyntaxError: unterminated string literal (detected at line 1); perhaps you escaped the end quote?

(The raw string situation in the linked issues that inspired this is a little extra tricky, since the workaround is still not clear. But hopefully the message still makes it clearer to users what is going on)

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp