4 ms·
Because that would make the change backwards incompatible. Some code out there could be (ab)using the fact that default arguments are bound at function definiti
by sushibowl 5y ago
Because that would make the change backwards incompatible. Some code out there could be (ab)using the fact that default arguments are bound at function definition time, and depend on that behavior to stay as it is. So this new behavior must be behind a new syntax.
- harel 5y agoBut said old code is using an older version of Python, which does not support this. The compiler could issue a warning for newer version until the switchover, and therefore save us from this "special case".