TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Problems with default function arguments (2020)

2 pointsby flipchartalmost 2 years ago

1 comment

PaulHoulealmost 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.