[PATCH 1 of 3] demandimport: define an importnow context manager
pierre-yves.david at ens-lyon.org
Thu May 28 11:30:54 CDT 2015
On 05/28/2015 07:32 AM, Jordi Gutiérrez Hermoso wrote:
> On Wed, 2015-05-27 at 11:42 -0700, Pierre-Yves David wrote:
>> Some black magic idea:
>> with demandimport.disable():
>> disable() both disable debug and return a context manager object
>> able to restore previous value on __exit__
> That's a bit too magical for my taste. But it gives me an idea. This
> looks great:
> with demandimport.disabled():
> I'll do that instead.
one letter difference for similar intend but different usage function.
what would possibily goes wrong…
More information about the Mercurial-devel