DEV Community

Discussion on: Pythonic code: the with statement

Collapse
 
mblayman profile image
Matt Layman

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.