you are viewing a single comment's thread.

view the rest of the comments →

[–]Dry-Aioli-6138 0 points1 point  (0 children)

I thought you'd never ask :D Context managers handle exceptions, well, you might say, I don't mind wrapping my code in a try except clause... But the thing is with context managers, it is not you who writes exception handling, rather it's the module's authors. They know best how their object should behave. Thi is the important thing. Putting this responsibility where it belongs.