Trey Hunner 🐍 on Nostr: Have you used "raise ... from None" in #Python? If so, what was your use case for ...
Have you used "raise ... from None" in #Python?
If so, what was your use case for "from None"?
What was the original exception that you were suppressing from the traceback and do you feel that suppression was helpful for users of your code (or were you just having fun with a new thing you learned)?
Published at
2024-12-10 03:09:00 UTCEvent JSON
{
"id": "246986278db4c01adf91193669f78a6f75864b5abcea651c976ca7eb18eb16c9",
"pubkey": "7e9159fbfd5526415c8d2de2e4c7654e3660883f9ccae720a70fa3c1f3cf1f45",
"created_at": 1733800140,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.social/@treyhunner/113626326037546771",
"web"
],
[
"t",
"python"
],
[
"proxy",
"https://mastodon.social/users/treyhunner/statuses/113626326037546771",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://mastodon.social/users/treyhunner/statuses/113626326037546771",
"pink.momostr"
],
[
"-"
]
],
"content": "Have you used \"raise ... from None\" in #Python?\n\nIf so, what was your use case for \"from None\"?\n\nWhat was the original exception that you were suppressing from the traceback and do you feel that suppression was helpful for users of your code (or were you just having fun with a new thing you learned)?",
"sig": "7575ac6ad90b01211f08e7b98ad5f8087b651e028614ee6ebc7fb4116a8d162a98b4a625fd3d447d891caea0f8b38958c1229e75441adf7020bdd7e967195be8"
}