Today, I needed to reference the MDN docs for JavaScript modules. As I skimmed through the page, something caught my eye: a file name with the .mjs extension. My first reaction was confusion. This was my first time seeing a file with that extension. Upon further reading, I learned .mjs is a ...
TIL
Avoid using mutable values as default parameter values in Python (Today I Learned)
Today I learned something interesting about the way Python functions behave with default parameter values: avoid using mutable objects such as lists as default values for function parameters. What's the problem? Default parameter values are evaluated when function is evaluated. Which means ...