3 ms·
But why would you want that doesn't that make for a more confusing api? Would it not be better to just have everything as a kwarg? You would get better types th
by vorticalbox 3y ago
But why would you want that doesn't that make for a more confusing api? Would it not be better to just have everything as a kwarg? You would get better types that way
- masklinn 3y agoI genuinely don’t understand what you are asking.
- zbentley 3y agoI think what GP is saying is that with explicit kwargs you can't express variadic signatures, i.e. "this function takes one int positional, and then any number of key/value pairs where the values are lists". The variable length is the important bit. It's certainly debatable whether doing that is better than passing a single argument whose value is a dict with that same type, but many people do prefer the variadic args/kwargs style.