2 ms·
Function names and class names are also part of your API and there's no facility to allow those to be arbitrarily renamed. Being able to rename positional param
by js2 8y ago
Function names and class names are also part of your API and there's no facility to allow those to be arbitrarily renamed. Being able to rename positional parameter names is a very weak argument in favor of this feature.
The only argument I'm even remotely sympathetic to is "If a function uses a name for a parameter, that precludes callers from using it as a keyword argument elsewhere in the argument list." But the workaround for that rare case is to use:
*args, **kwargs