[python-uk] Tell us what you did with Python this year....

Floris Bruynooghe flub at devork.be
Tue Dec 21 19:28:53 CET 2010


On 21 December 2010 18:09, Michael Foord <fuzzyman at voidspace.org.uk> wrote:
>
>
> On 21 December 2010 14:56, Jonathan Hartley <tartley at 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


More information about the python-uk mailing list