Python supports optional function arguments and allows default values to be
specified for any optional argument.
it can lead to some confusion when specifying an expression as the default value
for an optional function argument.
the bar argument is initialized to its default (i.e., an empty list)
only the first time that foo() is called
class variables are internally handled as dictionaries
In "Common Mistake #5", he uses both a lambda and array index based looping, neither of which are particularly Pythonic. A better example of where this is a problem in otherwise Pythonic code would be good.
In "Common Mistake #6" he uses a lambda in a list comprehension -- for an article of mistakes mostly made by Python beginners, this is going to make it tough to follow the example.
In "Common Mistake #7", he describes "recursive imports" where he means "circular imports".
In "Common Mistake #8" he refers repeatedly to "stdlib" where he means the Python Standard Library. Someone is going to read that and try to "import stdlib".
[Toptal blog editor]
Again, thanks for the attention to detail. We've fixed this as well.
Because it states it right near the top of the article.
3 is a really easy mistake to make for anyone (which is why the syntax was changed).
6, 7, 9 and 10 are more obscure, and where I really appreciate this article -- and they definitely can be issues for more experienced Python devs.