3 ms·
In my example, passing in none returns a value, not an error, so the intent is that it makes sense for that API to handle the None case in normal operation. Ho
by hedora 3y ago
In my example, passing in none returns a value, not an error, so the intent is that it makes sense for that API to handle the None case in normal operation. However, in situations where the compiler can infer the argument is never None, it can remove the branch.
(Yes, that function should probably handle overflow explicitly, but that wasn't the point.)