DEV Community

Discussion on: Python exceptions considered an anti-pattern

Collapse
 
sobolevn profile image
Nikita Sobolev

Well, indeed I have not that much experience with C or php@4 (while I still maintain one insanely large legacy php@4 project), but I have spent quite a lot of time with other languages without exceptions: like rust or elixir (which technically has exceptions, but their use is limited and noted with special ! functions).

And I value python's way of dealing with errors. I just want to provide an alternative that will solve problems that do exist.

Now it is your choice either to use exceptions or to use returns when you need to as explicit as possible.