Re:Overload functions in Python
by rusk on Monday February 17, 2020 @12:51PM
(#22349253)
I think the kwargs approach is fine for when you’re reading your code. When you’re writing I think you’ll always have to consult the docs, or headers. In a strongly typed language IDE can pick up the hint but in a more dynamic language like python it can get confused.
[ Parent
| on HN ]
Re:Overload functions in Python
by testuser66 on Thursday February 20, 2020 @04:50AM
(#22373902)
My bad - I meant this but didn't know how to format code so that is showed the stars
def func(*args, **kwargs)
I am in full support of actual kwargs with names, it's the wildcard ones that I don't like.