Python partial on steroids