[openstack-dev] [nova] contextlib.nested and Python3 failing

Jay Pipes jaypipes at gmail.com
Tue Aug 25 19:23:28 UTC 2015


On 08/25/2015 10:17 AM, Joshua Harlow wrote:
> Oh, discard everything I say then :)
>
> My brain must still be partially functioning due to vacation, haha.

import functools

def work(vacation=False):
     if not vacation:
         get_lots_done()

back_from_vacation = functools.partial(work, vacation=True)

There you go, Josh. There's your partial function.

Best,
-jay



More information about the OpenStack-dev mailing list