5 ms·
> This is one of those areas where I find Python a little contradictory. It's not contradictory. You should never use args and kwargs unless you need them. Usu
by Alex3917 8y ago
> This is one of those areas where I find Python a little contradictory.
It's not contradictory. You should never use args and kwargs unless you need them. Usually they're only needed in relatively rare situations, like A) when you're building a dictionary dynamically without knowing what the key names will be in advance B) when building a library where you want to allow people to subclass a parent class, but also reserve the right to change method signatures in the parent class without breaking the user code.
If developers are just using args and kwargs when calling one normal function from another then you should absolutely should not merge their pull requests until this gets removed.
- bunderbunder 8y agoThey absolutely do solve a problem. But I can't help but wonder if it would have been possible to find a way to let people solve that problem in a more explicit manner. The specific solution the Python team chose smells to me like one that was optimized for the convenience of the language's implementors more so than its users.