by nmalaguti · 4y ago · 0 comments
process_data(**kwargs)
and have the data field pulled out of kwargs. Of course you can still do data = kwargs.pop(“data”)
process_data(data, **kwargs)
but if you are the only library doing it, it can cause things to break when it breaks programmers expectations.Just call it as `*args, **kwargs`. That's something you need to do when forwarding anyway.
I have an article in the earlier stages about what I call the "keyword arguments blender" and how to avoid it, I think it's a common anti-pattern in lots of Python code (including my own, guilty!)
You can't always trust documentation to be accurate and up to date.