5 ms·
It's probably subjective, but I don't see the need to wrap your code in a try/except block as an improvement over an optional sum type, and I really don't see t
by codebje 3y ago
It's probably subjective, but I don't see the need to wrap your code in a try/except block as an improvement over an optional sum type, and I really don't see the use of a magic value to indicate no value as an improvement over anything.
- bombolo 3y agoIf it's not a try it's an if... you still need to handle the case where the key wasn't present and figure something out.