Taking Advantage of *args and **kwargs
I consistently forget the option word I have included in a function and so I had to design a way to accept different keywords (option) names to trigger features with in a function.
As an example, assigning a color to a box border is very easy by just adding something like this to a function’s arguments:
def buildabox(msg, border_color="red"):
"""
docs go here to put a box around msg
"""
...
But, if you accidenally call the function like this, it will fail. my_box = buildabox(“my message”, box_color=“white on back”): …