On May 5, 6:36 am, Terry Reedy <tjre...@udel.edu> wrote: > The relatively new with statement and associated context managers are > designed, among other things, for this situation, where one needs to > alter and restore a global context. So here is my updated (3.1) > proof-of-concept version.
This is what I love about c.l.p, you wait 10 mins and someone proves your point with working code :) I had a more generic 'with indentation:' context manager in mind, but I really like your approach. Cheers. -- http://mail.python.org/mailman/listinfo/python-list