Python Weekly

Follow this link and sign-up for the newsletters if you have an interest in python. Their weekly newsletter/email always contains at leasst one article that is interesting and educational Find it here »

Taking advantage of *args and **kwargs

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 """ … ’'' »