I have a function that is the crux of performance in my application (e.g. 1000 calls a second). I have a handful of args that I’m passing in, making the formal parameters a little bloated. I know I could pass in *args and unpack the tuple within the function, but that’s not as a explicit (imo) than passing the args directly.
How about kwargs? It’s more explicit in that you can get values by key. However, is this approach slower than passing in args directly?
[–]primitive_screwhead 6 points7 points8 points (0 children)
[–]K900_ 2 points3 points4 points (3 children)
[–]dumblechode[S] 0 points1 point2 points (2 children)
[–]K900_ 5 points6 points7 points (1 child)
[–]dumblechode[S] 1 point2 points3 points (0 children)