Martin McBride
1 min readJul 9, 2020

--

Nice article, but args and kwargs should only normally be used if a function has a genuine need for a variable number of arguments. For example, the print function.

If you just want to add an extra parameter to a function without breaking existing code, it is often better to use optional arguments, eg

version2(a, b, c=0)

--

--

Martin McBride
Martin McBride

No responses yet