|
|
|
|
|
by maximilianroos
1585 days ago
|
|
Great to see this! Thanks for working on it. Could you compare it to functools.partial? In the example on the Readme: import better_partial as bp
@bp.partial
def some_operation(x, p1, p2):
return (x + p1) * p2
It claims that the bp approach is superior because: func = some_operation(bp._, 10, 20)
...is better than: func = lambda x: some_operation(x, 10, 20)
But is it better than just: partial(some_operation, p1=10, p2=20)
?
|
|
https://gist.github.com/chrisgrimm/64bca66f14528cfda6d865cc2...