4 ms·
This isn't a problem, it is a design decision that you evidently don't like. There is a difference.
by larkost 7y ago
This isn't a problem, it is a design decision that you evidently don't like. There is a difference.
- minitech 7y agoAs a fan of Python, I agree that it’s a problem, and probably one of Python’s worst design decisions. It doesn’t achieve anything over sentinels, and results in lots of potential for hidden bugs (especially in the case of __getattr__, and before PEP 479). Comparison overloading even does use NotImplemented instead of an exception.
- rumanator 7y ago> This isn't a problem It actually is. Abusing exceptions as the normal control flow is a crude anti-pattern. Obviously the normal flow of control is not exceptional behavior. Therefore, abusing exceptions and exception-handling mechanisms to implement the happy path is simply wrong at many levels, from conceptual to practical, and in the end actually cause problems and hard to find buga such as the problems described in this bug report.