On Fri, 25 Sep 2020 at 11:58, Samuel Colvin <samcol...@gmail.com> wrote: > I first found myself wanting this when I came back to python > having been writing rust. The Result type in rust is somewhat > similar to what's being suggested here. See > https://doc.rust-lang.org/std/result/
I do not know Rust and I'm not sure I understood 100% the code. But, if I'm not wrong, Rust does not use try-catch, but pattern matching. It seems to me that Rust has a good exception handling system, but Python does not (yet) have pattern matching. The main question here is why using a hint or a decorator should be better than a simple documentation. If the goal is to force people to manage the exception, no, thanks. As Serhiy Storchaka already said, it was historically proven as bad. And even if I've not a great knowledge in Java (3 years), I can assure you checked exceptions are a really bad idea. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/BRU5WUAFQWMKIJ5I6GWGKTRPSYAGTLRS/ Code of Conduct: http://python.org/psf/codeofconduct/