Posts Tagged ‘design_patterns’
- Headline
Python Context Manager and the With Statement
- Date
- October 11th, 2010
- Category
- Developer
- Story
Context managers are a great way to “loan” out objects. In conjunction with python’s “with” statement, this can be quite the powerful design pattern. You will see ways to automatically clean up entire objects or parts of objects once they are no longer needed. Below we create an object to be used temporarily, “loan” it … read more
- Comments
- No Comments »
