3 ms·
You pretty much nailed it right there. Before I ever ask this question (I do a lot of tech interviews sadly) I always ask the candidate about object mutability
by SEJeff 12y ago
You pretty much nailed it right there.
Before I ever ask this question (I do a lot of tech interviews sadly) I always ask the candidate about object mutability vs immutability. Almost everyone knows the textbook answer, and only a few know the actual implications of it. This tests which they know :)
Default kwargs of a function are defined at function definition. However, they are only in scope, for the scope of said function. It is a weird but important subtle difference.