This page is still under construction.

back to posts

Always use None for default args in Python

https://unhashable.com/always-use-none-for-default-args-in-python/

I was looking for a way to define optional arguments in Python without setting a default and run into this article. Author porposes to use None for defualt values always. I think this is a little bit of a stretch but is certainly useful for my use case.

If you found it useful, please consider signing up to my newsletter. Every week, I share my thoughts on cool stuff I found around the internet. No spam, ever. Unsubscribe any time.