Title: Improve `raise from ValueError()` error message · Issue #134036 · python/cpython · GitHub
Open Graph Title: Improve `raise from ValueError()` error message · Issue #134036 · python/cpython
X Title: Improve `raise from ValueError()` error message · Issue #134036 · python/cpython
Description: Feature or enhancement #133999 gave me an idea. Right now it is: I suggest making it something similar to: >>> raise from ValueError File "
Open Graph Description: Feature or enhancement #133999 gave me an idea. Right now it is: I suggest making it something similar to: >>> raise from ValueError File "
X Description: Feature or enhancement #133999 gave me an idea. Right now it is: I suggest making it something similar to: >>> raise from ValueError File "<python-input-1>", line 1 raise f...
Opengraph URL: https://github.com/python/cpython/issues/134036
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improve `raise from ValueError()` error message","articleBody":"# Feature or enhancement\n\nhttps://github.com/python/cpython/issues/133999 gave me an idea. Right now it is:\n\n\u003cimg width=\"788\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/59cf42f5-3f51-495f-ac49-7dc6baab401f\" /\u003e\n\nI suggest making it something similar to:\n\n```python\n\u003e\u003e\u003e raise from ValueError\n File \"\u003cpython-input-1\u003e\", line 1\n raise from ValueError\n ^^^^\nSyntaxError: invalid syntax, maybe you forgot an exception after `raise` keyword?\n```\n\nWording is not the best at the moment, but we will figure it out :)\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-134077\n* gh-135204\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/sobolevn","@type":"Person","name":"sobolevn"},"datePublished":"2025-05-15T08:45:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/134036/cpython/issues/134036"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:686a8e89-8ba1-1719-9b30-15700ce7f162 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A374:388B78:71C800:92F7CF:696AEBB5 |
| html-safe-nonce | 8690285d15c8372e72b97f4f098650069068ccabc47ce996bad7ccc894bda5b3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzc0OjM4OEI3ODo3MUM4MDA6OTJGN0NGOjY5NkFFQkI1IiwidmlzaXRvcl9pZCI6IjIwNzI2ODc5NDk2NTQ5Nzc0NjEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e467cc4c5dc673deb99581a15c08918b42ac5c59b3e192dde6f0960d7fa6d0e6 |
| hovercard-subject-tag | issue:3065458014 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/134036/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e29eddd6be095b08d810d587aa6ef8f3da5bb7a8bab5b9c4a84cc81cb68ab26f/python/cpython/issues/134036 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e29eddd6be095b08d810d587aa6ef8f3da5bb7a8bab5b9c4a84cc81cb68ab26f/python/cpython/issues/134036 |
| og:image:alt | Feature or enhancement #133999 gave me an idea. Right now it is: I suggest making it something similar to: >>> raise from ValueError File " |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sobolevn |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width