Yong Cui
1 min readMay 7, 2020

--

Hi Sean,

I’m glad you liked the article.

I definitely agree with you that the use of *args and **kwargs results in explicit code. In terms of practical usages of these, I can think of the following. For example, the built-in zip function takes a variable number of iterables. For another example, if you create a decorator function that wraps all functions, the wrapped functions should be very generic, which means the usage of *args and **kwargs.

Cheers,

Yong

--

--

Yong Cui
Yong Cui

Written by Yong Cui

Work at the nexus of biomedicine, data science & mobile dev. Author of Python How-to by Manning (https://www.manning.com/books/python-how-to).

Responses (1)