3 ms·
What specifically bothers you about functools partial? I think the decorator is nice in certain ways. However, then you have to decorate your code and guess whe
by memco 5y ago
What specifically bothers you about functools partial? I think the decorator is nice in certain ways. However, then you have to decorate your code and guess where you’re going toy need the partials or create wrappers just to add the decorator which seems undesirable for a number of cases. I agree that partial has warts when it comes to inspection but at least they’re easy to make anywhere you want without having to apply any changes to the callee. Nice to have another option for partials though so that when you need these features there’s a way to get them.
- cgrimm1994 5y agoI posted this below, but I can put it here too: https://gist.github.com/chrisgrimm/64bca66f14528cfda6d865cc21fe77d4 https://gist.github.com/chrisgrimm/64bca66f14528cfda6d865cc2... Essentially functools.partial is somewhat limited in terms of which arguments can be partially applied.