
Aug. 3, 2011
1:11 a.m.
I find that I am often writing code in the following pattern: foo = MyContextManager(*args) for bar in my_iter: with foo: # do stuff I think it would be much cleaner to be able to write: for bar in my_iter with MyContextManager(*args): # do stuff -Mark