Hacker News new | ask | show | jobs
Problems with default function arguments (2020) (quuxplusone.github.io)
2 points by flipchart 1042 days ago
1 comments

Kinda funny, I've been doing a Python project lately that addresses the "default function argument" problem by doing lots and lots of currying, that is I just define some function that returns a function that bakes in all the parameters for a simple case so what could be a 7-argument function is a call to a 6-argument function to get a 1-argument function that I call over and over again.