Vladimir

65%
Flag icon
Having a try/finally (or a with block) around the yield is an unavoidable price of using @contextmanager, because you never know what the users of your context manager are going to do inside the with block.
Fluent Python: Clear, Concise, and Effective Programming
Rate this book
Clear rating
Open Preview