3 ms·
If it were available it would be part of how libraries are designed and you would use it all the time.
by pharmakom 4y ago
If it were available it would be part of how libraries are designed and you would use it all the time.
- overgard 4y agoI mean, it essentially is available though, "from functools import partial". I just have never seen any examples other than the perfunctory useless math ones: mult_10 = partial(mult, 10) mult_10_20 = partial(mult_10, 20) print(mult_10_20(30)) The only context I can think of off the top of my head where currying might be useful is binding a "this" or "self" object, but, if I'm using a class I already get that. Maybe you could use it to pass through some set of context objects, but then, you could already do that by just creating a data structure to hold those objects.