use partial instead of lambda

functools.partial captures the values of args and kargs when the partial
function is defined.  This is desirable over lambda which is dependent
on the namespace.