3 ms·
> then let's maybe not worry about performance right now and instead optimize for intuition, maintainability and readability. I would argue that throwing excep
by dahfizz 4y ago
> then let's maybe not worry about performance right now and instead optimize for intuition, maintainability and readability.
I would argue that throwing exceptions is the intuitive and readable thing for Python. Having to call isinstance for all possible return types of a function is not the "pythonic" way.