Mutable types as default params in Python

Posted on Thu, 09 Jun 2016 in Python • Tagged with Python, default params

Do you ask yourself why you souldn't use mutable types as default value for parameters in Python? I'm sure you ask at least if you are not a junior. Probably, your answer is "It causes to strange side effects". However, only a tiny part of python developers makes step throw and figure out how it works under the hood.

Continue reading