On 21 December 2010 18:09, Michael Foord <fuzzy...@voidspace.org.uk> wrote: > > > On 21 December 2010 14:56, Jonathan Hartley <tart...@tartley.com> wrote: >> >> On 21/12/2010 14:45, Michael Foord wrote: >>> >>> my favourites being contextlib.ContextDecorator >> >> I didn't know that had your fingerprints on it! Nice one - I love this and >> use it all the time. > > It came out of the pattern used in mock where patch (and other decorators) > also work as context managers. This was first implemented at Resolver > Systems... (I think it was Tom's idea.)
Heh neat that has made it into the stdlib, even neater that it's used in contextlib.contextmanager by default. I had no idea! Though rather disappointing that it is no longer a cute hack to impress people with ;-) FWIW I'd first heard of it from Dave Beazley's blog, I guess it got invented in several places at the same time which must be a good sign too. Regards Floris -- Debian GNU/Linux -- The Power of Freedom www.debian.org | www.gnu.org | www.kernel.org _______________________________________________ python-uk mailing list python-uk@python.org http://mail.python.org/mailman/listinfo/python-uk