Skip to content

Improve raise from ValueError() error message #134036

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sobolevn opened this issue May 15, 2025 · 0 comments
Open

Improve raise from ValueError() error message #134036

sobolevn opened this issue May 15, 2025 · 0 comments
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-parser type-feature A feature request or enhancement

Comments

@sobolevn
Copy link
Member

sobolevn commented May 15, 2025

Feature or enhancement

#133999 gave me an idea. Right now it is:

Image

I suggest making it something similar to:

>>> raise from ValueError
  File "<python-input-1>", line 1
    raise from ValueError
          ^^^^
SyntaxError: invalid syntax, maybe you forgot an exception after `raise` keyword?

Wording is not the best at the moment, but we will figure it out :)

Linked PRs

@sobolevn sobolevn self-assigned this May 15, 2025
@sobolevn sobolevn added type-feature A feature request or enhancement interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-parser 3.15 new features, bugs and security fixes labels May 15, 2025
@picnixz picnixz removed the 3.15 new features, bugs and security fixes label May 15, 2025
sobolevn added a commit to sobolevn/cpython that referenced this issue May 16, 2025
vstinner added a commit to vstinner/cpython that referenced this issue Jun 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-parser type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy