> I mean, the easy solution is don’t use Python
:)
People will be much better off and happier if they switch to Go for 99% of tasks. I’ll understand if it’s python for machine learning.
:)
People will be much better off and happier if they switch to Go for 99% of tasks. I’ll understand if it’s python for machine learning.
if err != nilRe: guaranteed behavior, correct me if I'm wrong, but for anything in stdlib, you'll either get the expected return value or an exception. For example, checking an array with str.isdigit() isn't undefined if the array has a None, it raises AttributeError.
But yes, you can just yolo things and hope for the best, which is why it's a terrific scripting language. If you add typing and properly catch expected errors, it's quite capable. Whether or not Try/Except blocks are uglier than err is nil is subjective.