News for hackers. Stuff that matters.
Re:What's New in Python 3.11? by dc01 on Tuesday June 28, 2022 @07:04AM (#31906237)
Small nitpick :

In Rust you would use an Enum (a discriminated Union) for this not an Union and you wouldn't need unsafe.

Re:What's New in Python 3.11? by valenterry on Tuesday June 28, 2022 @07:16AM (#31906303)
That's exactly my point: you should not have to define and use an enum here. The compiler should be smart enough to figure out that the result will be `Result<T, Error1 | Error2>` without the user doing anything here.