Settings

Theme

Problems with default function arguments (2020)

quuxplusone.github.io

2 points by flipchart 2 years ago · 1 comment

Reader

PaulHoule 2 years ago

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.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection