The late binding thing is clearly a bug. I don't understand how the python community consider that a feature.
It look to me that some people thought of optimizing the computing speed of variables allocation and decided it was shorter to reference the same heap space instead of doing a new stack allocation. It is indeed faster but leads to that obviously flawed behavior.
Now I'm not developing the interpreter so I might be totally wrong but so far I haven't seen a valid justification to that behavior.
What do you mean by "late binding"? AFAIK late binding is a slightly different term (with slightly different semantics) for dynamic typing, but from the way you talk about this it seems you are referring to the default arguments gotcha?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The late binding thing is clearly a bug. I don't understand how the python community consider that a feature.
It look to me that some people thought of optimizing the computing speed of variables allocation and decided it was shorter to reference the same heap space instead of doing a new stack allocation. It is indeed faster but leads to that obviously flawed behavior.
Now I'm not developing the interpreter so I might be totally wrong but so far I haven't seen a valid justification to that behavior.
What do you mean by "late binding"? AFAIK late binding is a slightly different term (with slightly different semantics) for dynamic typing, but from the way you talk about this it seems you are referring to the default arguments gotcha?