Can one partially apply the second argument of a function that takes no keyword arguments?

No

According to the documentation, partial cannot do this (emphasis my own):

partial.args

The leftmost positional arguments that will be prepended to the positional arguments


You could always just “fix” pow to have keyword args:

_pow = pow
pow = lambda x, y: _pow(x, y)

Leave a Comment