DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 964,423 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in

Discussion on: Pythonic code: the with statement

Collapse
 
mblayman profile image
Matt Layman Author

Ha, that's fair. I was focusing on with so I didn't want to muddy the example with specific exception classes, but I agree that I probably should have put something better in there.

This series is aimed pretty squarely at newer Python developers so I've tried to avoid more complex scenarios and give a gentle introduction to with since people may have never seen anything like it in their language of choice.