3 ms·
Ah, so 'with' is a clearer syntax for exception handling, that's what I was missing. Thanks to you, masklinn and graue for clearing that up.
by AceJohnny2 14y ago
Ah, so 'with' is a clearer syntax for exception handling, that's what I was missing. Thanks to you, masklinn and graue for clearing that up.
- nnq 14y agoGlad it helped you, but I wouldn't say "a clearer syntax for exception handling" really... more like a "way to ensure your code always works without having to actually think about exceptions". (Wrong as it may seem, I try to imagine I'm using "let" in a Lisp and then I instantly start to love the "with" syntax, although it's not a necessary part of Python :) )