2 ms·
[Edit: deleted my original reply here. I had ended in "Are you sure you didn't misread the original comment?"] Ah ha! I misread your comment! This was the bit
by quietbritishjim 6y ago
[Edit: deleted my original reply here. I had ended in "Are you sure you didn't misread the original comment?"]
Ah ha! I misread your comment! This was the bit that confused me:
> They're also an escape hatch,
I read this as
> There's also an escape hatch,
So I thought you were saying that the code in your comment was a solution to the problem posted by the original comment. This is why I found your comment so bewildering! I now see that what you were saying that this gotcha (Python evaluates function default arguments, once, at the point of definition) also has a use.
So, I have to say sorry about that. But I also can't help saying your comment could've been phrased a bit less confusingly.