3 ms·
Sure there is a reason it is that way. But it doesn't mean it's not incredibly unintuitive and error-prone.
by throwaway0665 2y ago
Sure there is a reason it is that way. But it doesn't mean it's not incredibly unintuitive and error-prone.
- Joker_vD 2y agoYes, the reason is that it's a tradition to have it this way. Python IMHO has decent enough assignment semantics that using "default argument expressions" model would've been fine, unlike e.g. in C++.